summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-07-15 17:18:12 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-07-15 17:18:12 +0400
commitad4d8f40f526e7af1334b05a9d693ea03084b4bb (patch)
treeeec0b384bea32d946a3d68b4ca5bbd5a3611ba4f /misc.c
parent2231bd520c70b5b33437723b5ce9951449421246 (diff)
downloadbdwgc-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.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/misc.c b/misc.c
index f0e4480f..366603c2 100644
--- a/misc.c
+++ b/misc.c
@@ -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);