Commit 61039cd0 by Mark Mitchell Committed by Mark Mitchell

irix_threads.cc (GC_pthread_detach): Do not use REAL_FUNC.

	* irix_threads.cc (GC_pthread_detach): Do not use REAL_FUNC.
	(GC_pthread_create): Fix typo.
	(GC_TRY_LOCK): Likewise.
	* include/private/gc_locks.h (GC_test_and_set): Only take one
	one argument.
	(LOCK): Adjust appropriately.
	* include/private/gc_priv.h (SIG_SUSPEND): Use SIGRTMIN if
	_SIGRTMIN is unavailable.

From-SVN: r53636
parent bce0deb2
Sun May 19 11:32:03 2002 Mark P Mitchell <mark@codesourcery.com>
* irix_threads.cc (GC_pthread_detach): Do not use REAL_FUNC.
(GC_pthread_create): Fix typo.
(GC_TRY_LOCK): Likewise.
* include/private/gc_locks.h (GC_test_and_set): Only take one
one argument.
(LOCK): Adjust appropriately.
* include/private/gc_priv.h (SIG_SUSPEND): Use SIGRTMIN if
_SIGRTMIN is unavailable.
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* acinclude.m4: Allow for PWDCMD to override hardcoded pwd. * acinclude.m4: Allow for PWDCMD to override hardcoded pwd.
......
...@@ -221,9 +221,9 @@ ...@@ -221,9 +221,9 @@
# ifdef MIPS # ifdef MIPS
# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ # if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \
|| !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700
# define GC_test_and_set(addr, v) test_and_set(addr,v) # define GC_test_and_set(addr) test_and_set(addr, 1)
# else # else
# define GC_test_and_set(addr, v) __test_and_set(addr,v) # define GC_test_and_set(addr) __test_and_set(addr,1)
# define GC_clear(addr) __lock_release(addr); # define GC_clear(addr) __lock_release(addr);
# define GC_CLEAR_DEFINED # define GC_CLEAR_DEFINED
# endif # endif
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
# define NO_THREAD (pthread_t)(-1) # define NO_THREAD (pthread_t)(-1)
# define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
# define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self())) # define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self()))
# define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); } # define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); }
# define UNLOCK() GC_clear(&GC_allocate_lock); # define UNLOCK() GC_clear(&GC_allocate_lock);
extern VOLATILE GC_bool GC_collecting; extern VOLATILE GC_bool GC_collecting;
# define ENTER_GC() \ # define ENTER_GC() \
......
...@@ -1916,7 +1916,11 @@ void GC_err_puts GC_PROTO((GC_CONST char *s)); ...@@ -1916,7 +1916,11 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
# define SIG_SUSPEND SIGPWR # define SIG_SUSPEND SIGPWR
# endif # endif
# else /* !GC_LINUX_THREADS */ # else /* !GC_LINUX_THREADS */
# define SIG_SUSPEND _SIGRTMIN + 6 # if defined(_SIGRTMIN)
# define SIG_SUSPEND _SIGRTMIN + 6
# else
# define SIG_SUSPEND SIGRTMIN + 6
# endif
# endif # endif
# endif /* !SIG_SUSPEND */ # endif /* !SIG_SUSPEND */
......
...@@ -519,7 +519,7 @@ int GC_pthread_detach(pthread_t thread) ...@@ -519,7 +519,7 @@ int GC_pthread_detach(pthread_t thread)
LOCK(); LOCK();
thread_gc_id = GC_lookup_thread(thread); thread_gc_id = GC_lookup_thread(thread);
UNLOCK(); UNLOCK();
result = REAL_FUNC(pthread_detach)(thread); result = pthread_detach(thread);
if (result == 0) { if (result == 0) {
LOCK(); LOCK();
thread_gc_id -> flags |= DETACHED; thread_gc_id -> flags |= DETACHED;
...@@ -599,7 +599,7 @@ GC_pthread_create(pthread_t *new_thread, ...@@ -599,7 +599,7 @@ GC_pthread_create(pthread_t *new_thread,
si -> start_routine = start_routine; si -> start_routine = start_routine;
si -> arg = arg; si -> arg = arg;
LOCK(); LOCK();
if (!GC_initialized) GC_init(); if (!GC_is_initialized) GC_init();
if (NULL == attr) { if (NULL == attr) {
stack = 0; stack = 0;
(void) pthread_attr_init(&new_attr); (void) pthread_attr_init(&new_attr);
...@@ -655,7 +655,7 @@ VOLATILE GC_bool GC_collecting = 0; ...@@ -655,7 +655,7 @@ VOLATILE GC_bool GC_collecting = 0;
#define SLEEP_THRESHOLD 3 #define SLEEP_THRESHOLD 3
unsigned long GC_allocate_lock = 0; unsigned long GC_allocate_lock = 0;
# define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock,1) # define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock)
# define GC_LOCK_TAKEN GC_allocate_lock # define GC_LOCK_TAKEN GC_allocate_lock
void GC_lock() void GC_lock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment