From 80da7344aef075777df0a780345cfb227bafd140 Mon Sep 17 00:00:00 2001 From: hboehm Date: Thu, 25 Sep 2008 00:51:23 +0000 Subject: [PATCH] 2008-09-24 Hans Boehm (Really Ivan Maidanski) * win32_threads.c (GC_pthread_join, GC_pthread_start_inner): Remove unused variables. * darwin_stop_world.c: Always declare GC_thr_init(). * dbg_mlc.c (GC_debug_free_inner): Dont touch oh_sz if SHORT_DBG_HDRS is defined. * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel mark, USE_MARK_BITS version): Refer to correct parameter name. --- ChangeLog | 9 +++++++++ darwin_stop_world.c | 3 ++- dbg_mlc.c | 2 ++ include/private/gc_pmark.h | 6 +++--- win32_threads.c | 3 --- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c25c9eac..c3e43bfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-24 Hans Boehm (Really Ivan Maidanski) + * win32_threads.c (GC_pthread_join, GC_pthread_start_inner): + Remove unused variables. + * darwin_stop_world.c: Always declare GC_thr_init(). + * dbg_mlc.c (GC_debug_free_inner): Dont touch oh_sz if + SHORT_DBG_HDRS is defined. + * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel + mark, USE_MARK_BITS version): Refer to correct parameter name. + 2008-09-24 Hans Boehm (Really Ivan Maidanski) * finalize.c (GC_general_register_disappearing_link): Remove redundant code. diff --git a/darwin_stop_world.c b/darwin_stop_world.c index 7ed9c899..0ac86609 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -72,9 +72,10 @@ unsigned long FindTopOfStack(unsigned long stack_start) return (unsigned long)frame; } -#ifdef DARWIN_DONT_PARSE_STACK void GC_thr_init(void); +#ifdef DARWIN_DONT_PARSE_STACK + void GC_push_all_stacks(void) { int i; diff --git a/dbg_mlc.c b/dbg_mlc.c index a09bd54f..99b6cbaa 100644 --- a/dbg_mlc.c +++ b/dbg_mlc.c @@ -762,8 +762,10 @@ void GC_debug_free_inner(void * p) { ptr_t base = GC_base(p); GC_ASSERT((ptr_t)p - (ptr_t)base == sizeof(oh)); +# ifndef SHORT_DBG_HDRS /* Invalidate size */ ((oh *)base) -> oh_sz = GC_size(base); +# endif GC_free_inner(base); } #endif diff --git a/include/private/gc_pmark.h b/include/private/gc_pmark.h index a72bf169..48e9ae9e 100644 --- a/include/private/gc_pmark.h +++ b/include/private/gc_pmark.h @@ -172,10 +172,10 @@ exit_label: ; \ /* For our uses, that's benign: */ # define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \ { \ - if (!(*(addr) & (mask))) { \ - AO_or((AO_t *)(addr), (mask); \ + if (!(*(addr) & (bits))) { \ + AO_or((AO_t *)(addr), (bits)); \ } else { \ - goto label; \ + goto exit_label; \ } \ } # else diff --git a/win32_threads.c b/win32_threads.c index f18f934e..85ad3162 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1212,7 +1212,6 @@ struct start_info { int GC_pthread_join(pthread_t pthread_id, void **retval) { int result; - int i; GC_thread joinee; # if DEBUG_CYGWIN_THREADS @@ -1316,8 +1315,6 @@ STATIC void * GC_pthread_start_inner(struct GC_stack_base *sb, void * arg) DWORD thread_id = GetCurrentThreadId(); pthread_t pthread_id = pthread_self(); GC_thread me; - GC_bool detached; - int i; # if DEBUG_CYGWIN_THREADS GC_printf("thread 0x%x(0x%x) starting...\n",(int)pthread_id, -- 2.40.0