Zach Saw [Fri, 16 Nov 2012 10:32:53 +0000 (21:32 +1100)]
Removed _inner suffix from
GC_make_disappearing_links_disappear_inner and
GC_remove_dangling_disappearing_links_inner.
Also replace 0 with NULL for pointers for refactored codes.
Moved DCL_LOCK_STATE to immediately follow last local var decl.
GC_move_disappearing_link_locked: rename back to
GC_move_disappearing_link_inner.
* finalize.c (GC_make_disappearing_links_disappear,
GC_remove_dangling_disappearing_links,
GC_move_disappearing_link_inner, GC_move_disappearing_link) :
As described above.
Zach Saw [Thu, 15 Nov 2012 23:20:11 +0000 (10:20 +1100)]
Created GC_make_disappearing_links_disappear and
GC_remove_dangling_disappearing_links. Moved related code under
comments for those respective functions into their respective
*_inner functions which accepts an additional dl_hashtbl_s struct.
Also refactored dl_hashtbl iteration and entry deletion codes into
macros to ease readability.
Zach Saw [Thu, 15 Nov 2012 22:34:36 +0000 (09:34 +1100)]
Moved code from GC_move_disappearing_link_inner that is within
locked region to GC_move_disappearing_link_locked. Also moved
DECL_LOCK_STATE from GC_unregister_disappearing_link to
GC_unregister_disappearing_link_inner.
* finalize.c (GC_move_disappearing_link_inner,
GC_unregister_disappearing_link_inner): As described above.
Zach Saw [Thu, 15 Nov 2012 01:18:25 +0000 (12:18 +1100)]
Moved most code from disappearing_link manipulation functions
(except for argument checks) to new *_inner function, accepting
a pointer to GC_dl_hashtbl along with the original arguments.
* finalize.c (GC_general_register_disappearing_link,
GC_unregister_disappearing_link, GC_move_disappearing_link):
Moved code out into their respective *_inner functions, namely
GC_register_disappearing_link_inner,
GC_unregister_disappearing_link_inner,
GC_move_disappearing_link_inner respectively. These _inner
functions accept an additional argument which is a pointer
to struct dl_hashtbl_s on top of its original arguments.
Ivan Maidanski [Sun, 11 Nov 2012 14:57:29 +0000 (18:57 +0400)]
Fix Win32 GC_write preventing potential infinite recursion at abort
* misc.c (GC_write): Define "inside_write" static variable (only
for Win32 and only if THREADS and GC_ASSERTIONS or
GC_PRINT_VERBOSE_STATS); if this variable is set then just return,
set this variable if GC_write_disabled or GC_log is
INVALID_HANDLE_VALUE just before ABORT call (to prevent infinite
recursion).
* misc.c (GC_default_on_abort): Do not call WRITE if GC_write_disabled
(only for Win32 and only if THREADS and GC_ASSERTIONS) to prevent
abort in GC_write.
Ivan Maidanski [Sun, 11 Nov 2012 12:29:09 +0000 (16:29 +0400)]
Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
* win32_threads.c (GC_delete_gc_thread): Rename to
GC_delete_gc_thread_no_free; remove GC_INTERNAL_FREE call; update
comment.
* win32_threads.c (GC_delete_thread, GC_suspend, GC_DllMain): Replace
GC_delete_gc_thread call with GC_delete_gc_thread_no_free one (since
GC_win32_dll_threads is true thus there is no entry to free).
* win32_threads.c (GC_delete_thread): Change type of "t" local
variable from GC_thread to GC_vthread.
* win32_threads.c (GC_stop_world): Update comment.
* win32_threads.c (GC_pthread_join, GC_pthread_detach): Replace
GC_delete_gc_thread call with GC_delete_gc_thread_no_free and
GC_INTERNAL_FREE calls (since GC_win32_dll_threads is false).
* win32_threads.c (GC_pthread_detach): Add assertion that
GC_win32_dll_threads is false.
Ivan Maidanski [Sat, 10 Nov 2012 11:37:06 +0000 (15:37 +0400)]
Improve GC error printing atomicity in GC_add_to_black_list_normal/stack
(as well as in GC_print_sig_mask, GC_print_block_list, GC_print_free_list)
* blacklst.c (GC_print_source_ptr): Replace with 3-argument
GC_print_blacklisted_ptr(); rename "p" to "source" argument;
move GC_err_printf calls surrounding GC_print_source_ptr invocation
from GC_add_to_black_list_normal and GC_add_to_black_list_stack;
replace GC_default_print_heap_obj_proc call with the corresponding
GC_err_printf call; merge adjacent GC_err_printf calls into single
one (for output in-line atomicity).
* blacklst.c (GC_add_to_black_list_normal,
GC_add_to_black_list_stack): Replace GC_print_source_ptr (and
surrounding GC_err_printf) call with GC_print_blacklisted_ptr one.
* pthread_stop_world.c (GC_print_sig_mask): Print each blocked signal
on a separate line (replace multiple GC_printf calls with a single one
ending with "\n").
* reclaim.c (GC_print_block_descr): Terminate GC_printf message with
"\n" (for output in-line atomicity).
* reclaim.c (GC_print_block_list): Remove redundant "\n" at the
beginning of GC_printf message (since GC_print_block_descr prints
new-line at the end of the message).
* reclaim.c (GC_print_free_list): Enumerate printed objects starting
from 0 (instead of 1); print information about each free object on
a separate line (replace multiple GC_printf calls with a single one
ending with "\n"); remove "lastBlock" local variable.
Ivan Maidanski [Thu, 8 Nov 2012 16:48:17 +0000 (20:48 +0400)]
Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
* include/private/gc_locks.h (USE_PTHREAD_LOCKS): Define for
SN_TARGET_PS3 target.
* include/private/gcconfig.h (NO_PTHREAD_TRYLOCK): Likewise.
* include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Remove
explicit definition for SN_TARGET_PS3.
* include/private/gc_locks.h (UNCOND_LOCK): Define as
pthread_mutex_lock(...) instead of GC_lock() (which calls
pthread_mutex_lock) if USE_PTHREAD_LOCKS but not GC_ASSERTIONS and
not USE_SPIN_LOCK.
Ivan Maidanski [Wed, 7 Nov 2012 17:00:36 +0000 (21:00 +0400)]
Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
(fix commit 38965f2)
* dbg_mlc.c (GC_start_debugging_inner): New static routine (move code
from old GC_start_debugging except for GC_register_displacement call
and add assertion on the lock).
* dbg_mlc.c (GC_start_debugging): Invoke GC_start_debugging_inner
holding the lock.
* dbg_mlc.c (GC_debug_register_displacement): Optimize speed (lock
once and use _inner variant of GC_register_displacement).
* dbg_mlc.c (GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page): Invoke
GC_start_debugging_inner instead of GC_start_debugging (since the lock
is already acquired).
Ivan Maidanski [Wed, 7 Nov 2012 03:05:49 +0000 (07:05 +0400)]
Add 'bytes reclaimed' counters to public GC_prof_stats_s
* alloc.c (GC_finish_collection): Add GC_bytes_found value to
GC_reclaimed_bytes_before_gc (if the former is non-negative and
not GC_GET_HEAP_USAGE_NOT_NEEDED) before reseting GC_bytes_found.
* include/gc.h (GC_prof_stats_s): Add bytes_reclaimed_since_gc and
reclaimed_bytes_before_gc fields.
* include/private/gc_priv.h (GC_reclaimed_bytes_before_gc): Declare
new GC inner variable (only if not GC_GET_HEAP_USAGE_NOT_NEEDED).
* misc.c (GC_reclaimed_bytes_before_gc): Define new variable (only if
not GC_GET_HEAP_USAGE_NOT_NEEDED).
* misc.c (fill_prof_stats): Fill in bytes_reclaimed_since_gc and
reclaimed_bytes_before_gc fields.
* tests/test.c (check_heap_stats): Invoke GC_get_heap_usage_safe,
GC_get_prof_stats, GC_get_prof_stats_unsafe (only if not
GC_GET_HEAP_USAGE_NOT_NEEDED).
Ivan Maidanski [Tue, 6 Nov 2012 15:53:02 +0000 (19:53 +0400)]
Add GC_get_prof_stats[_unsafe]() to GC public API
* include/gc.h (GC_get_heap_size): Update comment.
* include/gc.h (GC_prof_stats_s): New structure.
* include/gc.h (GC_get_prof_stats): New API function.
* include/gc.h (GC_get_prof_stats_unsafe): New API function (only if
GC_THREADS).
* misc.c (fill_prof_stats): New static function (only if not
GC_GET_HEAP_USAGE_NOT_NEEDED).
* misc.c (GC_get_prof_stats): New API function definition (only if not
GC_GET_HEAP_USAGE_NOT_NEEDED).
* misc.c (GC_get_prof_stats_unsafe): New API function definition (only
if THREADS but not GC_GET_HEAP_USAGE_NOT_NEEDED).
Ivan Maidanski [Tue, 6 Nov 2012 03:52:34 +0000 (07:52 +0400)]
Add FIXME for GC_max_large_allocd_bytes and GC_mark_stack_size growth
* malloc.c (GC_alloc_large): Add FIXME for GC_max_large_allocd_bytes
(currently there is no way for the variable value to be decreased over
the run time).
* mark.c (alloc_mark_stack): Add FIXME for GC_mark_stack_size.
Ivan Maidanski [Tue, 6 Nov 2012 03:13:29 +0000 (07:13 +0400)]
Fix unit in comment for some counters in gc_priv.h
* include/private/gc_priv.h (_GC_arrays): Fix comment for
_bytes_allocd_before_gc, _bytes_allocd, _composite_in_use and
_atomic_in_use fields (replace "words" unit with "bytes").
* include/private/gc_priv.h (GC_objfreelist): Fix comment (replace
"words" unit with "bytes").
Ivan Maidanski [Wed, 24 Oct 2012 04:29:42 +0000 (08:29 +0400)]
Fix potential double fclose in test_extras (cordtest)
* cord/tests/cordtest.c (test_extras): Explicitly clear cord handles
obtained from CORD_from_file(), invoke GC_gcollect and
GC_invoke_finalizers to force f1a, f1b, f2 handles to be closed before
removing the files; remove the second attempts to remove the files on
rename failure (print a warning instead) as it might cause double
fclose (or double free); add comments.
Ivan Maidanski [Wed, 24 Oct 2012 03:57:45 +0000 (07:57 +0400)]
Check traceable_allocator.allocate result before dereference in test_cpp
* tests/test_cpp.cc (main): Check "xptr" value (obtained from
traceable_allocator.allocate) for NULL (and exit with the
corresponding message in that case) before dereferencing it.
Ivan Maidanski [Tue, 23 Oct 2012 05:04:57 +0000 (09:04 +0400)]
Eliminate warning and simplify expression in GC_init_explicit_typing
* typd_mlc.c (GC_init_explicit_typing): Cast -1 argument of
WORDS_TO_BYTES() to word (instead of casting its result) to avoid
"overflow in signed shift operation" warning (issued by some static
code analysis tools).
* typd_mlc.c (GC_init_explicit_typing): Simplify expression for
computing GC_bm_table elements (remove redundant right shift of
unsigned -1 before left shift for the same amount of bits).
Ivan Maidanski [Tue, 23 Oct 2012 03:45:51 +0000 (07:45 +0400)]
Fix GC_clear_stack by declaring 'dummy' local array as volatile
* misc.c (GC_clear_stack): Declare "dummy" local array as volatile to
prevent optimizing it out by compiler; add cast of "dummy" to void*
(to un-volatile the pointer) in BZERO call (only if THREADS).
Ivan Maidanski [Mon, 22 Oct 2012 04:26:27 +0000 (08:26 +0400)]
Eliminate 'uninitialized variable use' warning in test_printf (cord)
* cord/tests/cordtest.c (test_printf): Initialize "l" and "s" local
variables (those values should be set by CORD_sprintf) to prevent
"uninitialized variable use" compiler (or static code analysis tool)
warning as well as for better testing of CORD_sprintf.
Ivan Maidanski [Fri, 19 Oct 2012 05:10:07 +0000 (09:10 +0400)]
Fix GC_unix_mmap_get_mem for open of /dev/zero failure
* os_dep.c (GC_unix_mmap_get_mem): Check open("/dev/zero") (or open
of similar file on Symbian) result and abort (with the appropriate
message) on failure (only if USE_MMAP_ANON is undefined).
Ivan Maidanski [Fri, 19 Oct 2012 04:58:46 +0000 (08:58 +0400)]
Check GC_base result in GC_print_all_smashed_proc
* dbg_mlc.c (GC_print_all_smashed_proc): Add a code for a
LINT-like (static code analysis) tool to instruct it that GC_base is
invoked only with valid GC_smashed[] elements (so its result passed
to GC_print_smashed_obj is non-NULL).
Ivan Maidanski [Fri, 19 Oct 2012 03:50:18 +0000 (07:50 +0400)]
Improve staticrootstest checks (tests)
* tests/staticrootstest.c (libsrl_init): Report error (and exit) if
libsrl_init returns NULL; report the corresponding error if staticroot
content is not as expected.
Ivan Maidanski [Fri, 19 Oct 2012 03:27:29 +0000 (07:27 +0400)]
Specify GC_malloc result is unused in some tests
* tests/middle.c (main): Explicitly cast result of GC_malloc[_atomic]
to void (to outline that the result is unused intentionally).
* tests/test.c (run_one_test): Likewise.
Ivan Maidanski [Fri, 19 Oct 2012 03:12:09 +0000 (07:12 +0400)]
Add comment for big local_mark_stack variables in mark.c
* mark.c (LOCAL_MARK_STACK_SIZE): Fix letter case in comment.
* mark.c (GC_do_parallel_mark, GC_help_marker): Add comment about
local_mark_stack local variable size (some static analysis tools
issue warning about it).
* mark.c (GC_help_marker): Move local_mark_stack variable declaration
down to be the last one in the function.
Ivan Maidanski [Thu, 18 Oct 2012 15:05:54 +0000 (19:05 +0400)]
Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
* os_dep.c (GC_old_bus_handler_used_si): Define only if
FREEBSD/HURD/HPUX (since not used otherwise).
* os_dep.c (SIG_OK): Add comment.
* os_dep.c (GC_write_fault_handler): Replace as check of "sig" value
for SIGSEGV with that of SIGBUS and do this check only if
FREEBSD/HURD/HPUX (to avoid "dead code" compiler warning).
* os_dep.c (GC_dirty_init): Do not set GC_old_bus_handler_used_si
for LINUX (since used only on FREEBSD/HURD/HPUX); do not fix
GC_old_bus_handler value in case it is SIG_IGN for LINUX; add comment.
Ivan Maidanski [Wed, 17 Oct 2012 18:07:54 +0000 (22:07 +0400)]
Fix vsprintf_args cleanup in CORD_vsprintf
* cord/cordprnt.c (CORD_vsprintf): Invoke va_end (before return) for
vsprintf_args initialized by [__]va_copy (only if __va_copy defined
or GCC but not DJGPP).
Ivan Maidanski [Wed, 17 Oct 2012 17:58:38 +0000 (21:58 +0400)]
Minor code refactoring of GC_allochblk_nth
* allchblk.c (GC_allochblk_nth): Simplify code in the loop (which
allocates and drops the block in small chunks) by first calling
GC_install_header if h != hbp (instead of calling it a conditional
expression) and, then, calling setup_header if hhdr is non-NULL.
Ivan Maidanski [Wed, 17 Oct 2012 17:34:33 +0000 (21:34 +0400)]
Add comment about sigaction sa_restorer field
* os_dep.c (GC_find_limit_openbsd, GC_skip_hole_openbsd,
GC_set_and_save_fault_handler, GC_dirty_init): Add comment about
sigaction sa_restorer field initialization (some static code analysis
tools report about uninitialized field but according to Linux manual
it is obsolete and should not be used).
* pthread_stop_world.c (GC_stop_init): Likewise.
Ivan Maidanski [Tue, 9 Oct 2012 18:20:48 +0000 (22:20 +0400)]
Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
* win32_threads.c (CreateThread, ExitThread, _beginthreadex,
_endthreadex): Undefine unconditionally (because the original function
might be used even for GC_PTHREADS targets).
* win32_threads.c (GC_beginthreadex, GC_endthreadex): Do not define
on Cygwin because the latter does not provide _beginthreadex and
_endthreadex.
Ivan Maidanski [Sat, 29 Sep 2012 10:07:55 +0000 (14:07 +0400)]
Port BDWGC to Android/x86
* include/private/gc_priv.h (SETJMP, LONGJMP, JMP_BUF): Explicitly
define to setjmp/longjmp/jmp_buf (instead of
sigsetjmp/siglongjmp/sigjmp_buf), respectively, if GC_NO_SIGSETJMP.
* include/private/gcconfig.h (GC_NO_SIGSETJMP): New macro, define for
Android/x86.
* include/private/gcconfig.h (NO_GETCONTEXT): define for Android/x86
(since getcontext is missing in Android).
Ivan Maidanski [Sat, 29 Sep 2012 08:23:40 +0000 (12:23 +0400)]
Do not define _setjmp/_longjmp macros in mach_dep.c (code refactoring)
* mach_dep.c (_setjmp, _longjmp): Remove unused macro definition (if
OS2, or CX_UX or __CC_ARM).
* mach_dep.c (GC_with_callee_saves_pushed): Use setjmp instead of
_setjmp also for OS2, CX_UX and __CC_ARM.
Ivan Maidanski [Wed, 12 Sep 2012 05:46:41 +0000 (09:46 +0400)]
Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
* pthread_stop_world.c (GC_stop_world): Eliminate
"assigned value never used" compiler warning for "code" local variable
in conditional statement checking sem_wait result.
Ivan Maidanski [Tue, 11 Sep 2012 04:30:25 +0000 (08:30 +0400)]
Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
* alloc.c (min_bytes_allocd): Do not return zero in case of big
GC_free_space_divisor value (return 1 instead to prevent infinite loop
in GC_allocobj if GC_adj_bytes_allocd returns zero); update comment.
Ivan Maidanski [Sun, 9 Sep 2012 08:57:38 +0000 (12:57 +0400)]
Eliminate Clang warning for GC_pthread_exit attribute
* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_DECLARED): Test and
define new macro (only if GC_PTHREAD_EXIT_ATTRIBUTE) to prevent Clang
warning "attribute declaration must precede definition" for
GC_pthread_exit when this header included from extra/gc.c tail.
Ivan Maidanski [Thu, 30 Aug 2012 04:52:13 +0000 (08:52 +0400)]
Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW): Define new macro (if not defined
yet) for GCC v4.2+ (or clang).
* gc_cpp.cc: Include new (for std::bad_alloc) if
GC_NEW_DELETE_NEED_THROW.
* gc_cpp.cc (GC_DECL_NEW_THROW, GC_DECL_DELETE_THROW): New macros
(used to eliminate compiler "missing exception specification" warning
for 'new' and 'delete' operators).
* gc_cpp.cc (new, delete, new[], delete[]): Use
GC_DECL_NEW/DELETE_THROW to define 'throw' clause properly.
Ivan Maidanski [Thu, 30 Aug 2012 04:39:25 +0000 (08:39 +0400)]
.gitignore: remove path prefix for config.h and stamp-h1
* .gitignore: Add include/config.h.in (to ignore); remove path for
config.h and stamp-h1 (to ignore files both located in /include/private
(old behavior) and in /include folders).
Ivan Maidanski [Thu, 30 Aug 2012 04:32:15 +0000 (08:32 +0400)]
Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
(Change the behavior of HAVE_CONFIG_H macro to the standard one
which assumes that no folder is specified in #include "config.h".)
Ivan Maidanski [Wed, 1 Aug 2012 22:02:08 +0000 (02:02 +0400)]
Fix GC_clear_stack_inner by using GC_approx_sp
* misc.c (GC_clear_stack_inner): Use GC_approx_sp() instead of
"dummy[0]" set to "&dummy" value (that worked as expected only for
STACK_GROWS_DOWN case).
Ivan Maidanski [Wed, 1 Aug 2012 19:36:16 +0000 (23:36 +0400)]
Fix all address-of-dummy operations by using GC_approx_sp() instead
(previous commit 'd6acbda' has not solved this problem)
* alloc.c (min_bytes_allocd, GC_stopped_mark): Use GC_approx_sp()
instead of "&dummy"; remove 'dummy' local variable.
* dyn_load.c (GC_cond_add_roots): Likewise.
* misc.c (GC_init): Likewise.
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): Likewise.
* pthread_stop_world.c (GC_suspend_handler_inner,
nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed): Likewise.
* pthread_support.c (GC_thr_init): Likewise.
* ptr_chck.c (GC_on_stack): Likewise.
* win32_threads.c (GC_push_stack_for): Likewise.
* misc.c (GC_clear_stack_inner): Store address of volatile 'dummy'
local array (i.e. 'sp' value) to its first element (and use it in the
comparison of addresses) to prevent any harmful optimizations as C
officially disallows comparisons of pointers to different objects
(e.g., some Mac OS X clang releases might turn a conditional
expression that uses 'dummy' address into a constant); update comment.
* misc.c (GC_call_with_stack_base): Use "&base" instead of "&dummy"
(it is safe to use address of base here); remove dummy variable.
* os_dep.c (currently_updating): Change type from "word" to "int*".
* os_dep.c (async_set_pht_entry_from_index): Remove volatile and casts
for 'update_dummy' local variable.
* tools/setjmp_t.c (main): Define volatile 'sp' local variable, store
its address to it and use it instead of "&dummy"; remove 'dummy' local
variable.
Ivan Maidanski [Wed, 1 Aug 2012 05:50:01 +0000 (09:50 +0400)]
Resolve GCC warning in setjmp_t.c
* tools/setjmp_t.c (nested_sp): Change 'sp' local variable type from
int to word (to avoid 'cast from pointer to int' compiler warning).
* tools/setjmp_t.c (main): Cast pointers to unsigned long via word
type; cast WORDSZ value passed to printf() to match format type
specifier (to avoid compiler warnings).
Ivan Maidanski [Wed, 1 Aug 2012 05:42:36 +0000 (09:42 +0400)]
Fix all address-of-dummy operations by adding volatile
* alloc.c (min_bytes_allocd, GC_stopped_mark): Use volatile for
'dummy' local variable (used to get 'sp' value) to prevent any
harmful optimizations (e.g., some Mac OS X clang releases might turn
a conditional expression that uses 'dummy' address into a constant).
* dyn_load.c (GC_cond_add_roots): Likewise.
* mach_dep.c (GC_with_callee_saves_pushed): Likewise.
* misc.c (GC_clear_stack_inner, GC_init, GC_call_with_stack_base):
Likewise.
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
async_set_pht_entry_from_index): Likewise.
* pthread_stop_world.c (nacl_pre_syscall_hook,
__nacl_suspend_thread_if_needed): Likewise.
* pthread_support.c (GC_thr_init): Likewise.
* ptr_chck.c (GC_on_stack): Likewise.
* tools/setjmp_t.c (main): Likewise.
* win32_threads.c (GC_push_stack_for): Likewise.
* dyn_load.c (dummy): Change variable type from char to int.
* include/private/gcconfig.h: Update comment about GC_stackbottom
initialization.
* os_dep.c (GC_get_stack_base): Remove 'sp' local variable.
* os_dep.c (GC_get_main_stack_base): Define and use volatile 'dummy'
variable (instead of 'result') to get 'sp' value (revert part of
commit bddc75f).
* os_dep.c (GC_get_stack_base): Add missing cast of 'dummy' address
(only if NEED_FIND_LIMIT).
* pthread_stop_world.c (GC_suspend_handler_inner): Define and use
volatile 'dummy' variable (instead of 'me') to get 'sp' value (revert
part of commit 31fc0f6).
* pthread_stop_world.c (nacl_pre_syscall_hook,
__nacl_suspend_thread_if_needed): Rename 'local_dummy' to 'dummy'
local variable.
Ivan Maidanski [Tue, 24 Jul 2012 06:34:15 +0000 (10:34 +0400)]
Fix GC_dirty_init by avoiding GC_get_suspend_signal if no threads support
(fix commit '05daaee')
* os_dep.c (GC_dirty_init): Pass SIG_SUSPEND instead of
GC_get_suspend_signal() to sigaddset() if no THREADS (or if
GC_OPENBSD_THREADS, or GC_WIN32_THREADS or NACL).
* pthread_support.c (pthread_sigmask): Assert GC_get_suspend_signal()
does not return -1 (only if not GC_NO_PTHREAD_SIGMASK).