summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2007-05-15 20:57:47 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:39 +0200
commit37527712b987bc50fb6bd554526b1cefa5cafe75 (patch)
treed230a629fab4e4ae74d7324916c98ac45d5d2d8d /pthread_stop_world.c
parent074de161d5ee7aa09d143cd30c36ead67a4a2085 (diff)
2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
* Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist. * Makefile.in: Regenerate. * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add: remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update. * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use NUMERIC_THREAD_ID, THREAD_EQUAL. * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove. * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on ARM. * libatomic_ops-1.2/doc/README.txt: Update to reflect C++ standardization effort.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 75ef567..3a1524b 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -258,7 +258,7 @@ void GC_push_all_stacks()
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (p -> flags & FINISHED) continue;
++nthreads;
- if (pthread_equal(p -> id, me)) {
+ if (THREAD_EQUAL(p -> id, me)) {
# ifdef SPARC
lo = (ptr_t)GC_save_regs_in_stack();
# else
@@ -294,7 +294,7 @@ void GC_push_all_stacks()
GC_printf("Reg stack for thread 0x%x = [%lx,%lx)\n",
(unsigned)p -> id, bs_lo, bs_hi);
# endif
- if (pthread_equal(p -> id, me)) {
+ if (THREAD_EQUAL(p -> id, me)) {
/* FIXME: This may add an unbounded number of entries, */
/* and hence overflow the mark stack, which is bad. */
GC_push_all_eager(bs_lo, bs_hi);
@@ -331,7 +331,7 @@ int GC_suspend_all()
GC_stopping_pid = getpid(); /* debugging only. */
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
- if (p -> id != my_thread) {
+ if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> stop_info.last_stop_count == GC_stop_count) continue;
if (p -> thread_blocked) /* Will wait */ continue;
@@ -451,7 +451,7 @@ void GC_start_world()
AO_store(&GC_world_is_stopped, FALSE);
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
- if (p -> id != my_thread) {
+ if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) continue;
n_live_threads++;