summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-11 15:27:30 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:59 +0200
commit50ec4c5ca243cc90403b1e399f2b4272887f2e93 (patch)
treeea53260d2411181186ae79033f0bd600a8dbd4e5 /pthread_support.c
parent3c60adf047fe57b0edff8dc5aa456b7e72e89cef (diff)
2011-05-11 Ivan Maidanski <ivmai@mail.ru>
* backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro. * os_dep.c (GC_set_and_save_fault_handler): Recognize SIGACTION_FLAGS_NODEFER_HACK macro. * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK macro. * pthread_support.c (GC_acquire_mark_lock): Remove commented out code. * include/gc_inline.h (GC_MALLOC_WORDS, GC_MALLOC_ATOMIC_WORDS, GC_CONS): Remove trailing space (before back-slash). * include/private/gc_hdrs.h (GET_BI, GET_HDR_ADDR): Ditto. * include/private/gc_pmark.h (PUSH_OBJ, PUSH_CONTENTS, SET_MARK_BIT_EXIT_IF_SET, LONG_MULT, PUSH_CONTENTS_HDR, GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): Ditto. * include/private/thread_local_alloc.h (GC_key_create): Ditto. * include/private/gc_priv.h (SUNOS5SIGS): Don't include sys/siginfo.h on Linux. * include/private/gcconfig.h: Reformat comments (and some code). * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro recognized, force PREFETCH_FOR_WRITE to be defined on x86. * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New macro recognized (for HP/UX).
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/pthread_support.c b/pthread_support.c
index af16a57..8caaee0 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -1767,7 +1767,7 @@ GC_INNER void GC_lock(void)
GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
#endif
-#if 0
+#ifdef GLIBC_2_1_MUTEX_HACK
/* Ugly workaround for a linux threads bug in the final versions */
/* of glibc2.1. Pthread_mutex_trylock sets the mutex owner */
/* field even when it fails to acquire the mutex. This causes */
@@ -1785,11 +1785,6 @@ static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
GC_INNER void GC_acquire_mark_lock(void)
{
-/*
- if (pthread_mutex_lock(&mark_mutex) != 0) {
- ABORT("pthread_mutex_lock failed");
- }
-*/
GC_generic_lock(&mark_mutex);
# ifdef GC_ASSERTIONS
GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());