(Apply commit
8cdc862 from 'master' branch.)
* pthread_support.c (GC_acquire_mark_lock): Avoid assertion that
GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()) unless
NUMERIC_THREAD_ID_UNIQUE.
* win32_threads.c (GC_acquire_mark_lock): Likewise.
* win32_threads.c (NUMERIC_THREAD_ID): Add comment.
GC_INNER void GC_acquire_mark_lock(void)
{
- GC_ASSERT(GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()));
+# ifdef NUMERIC_THREAD_ID_UNIQUE
+ GC_ASSERT(GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()));
+# endif
GC_generic_lock(&mark_mutex);
SET_MARK_LOCK_HOLDER;
}
GC_INNER void GC_acquire_mark_lock(void)
{
- GC_ASSERT(GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()));
+# ifdef NUMERIC_THREAD_ID_UNIQUE
+ GC_ASSERT(GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()));
+# endif
if (pthread_mutex_lock(&mark_mutex) != 0) {
ABORT("pthread_mutex_lock failed");
}