diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2013-07-15 17:18:12 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2013-07-15 17:18:12 +0400 |
commit | ad4d8f40f526e7af1334b05a9d693ea03084b4bb (patch) | |
tree | eec0b384bea32d946a3d68b4ca5bbd5a3611ba4f /misc.c | |
parent | 2231bd520c70b5b33437723b5ce9951449421246 (diff) | |
download | bdwgc-ad4d8f40f526e7af1334b05a9d693ea03084b4bb.tar.gz |
Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
* include/private/gc_locks.h (GC_lock_holder): Do not declare unless
GC_ASSERTIONS (the variable is not longer used to prevent recursive
reentry in the system call wrapper).
* misc.c (GC_call_with_alloc_lock): Remove [UN]SET_LOCK_HOLDER
explicit calls since GC_lock_holder is set properly by [UN]LOCK()
(in case of GC_ASSERTIONS).
* pthread_support.c (GC_lock_holder): Do not define unless
GC_ASSERTIONS; adjust comment.
* win32_threads.c (GC_lock_holder): Likewise.
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -1808,14 +1808,9 @@ GC_API void * GC_CALL GC_call_with_alloc_lock(GC_fn_type fn, void *client_data) # ifdef THREADS LOCK(); - /* FIXME - This looks wrong!! */ - SET_LOCK_HOLDER(); # endif result = (*fn)(client_data); # ifdef THREADS -# ifndef GC_ASSERTIONS - UNSET_LOCK_HOLDER(); -# endif /* o.w. UNLOCK() does it implicitly */ UNLOCK(); # endif return(result); |