diff options
-rw-r--r-- | pthread_support.c | 8 | ||||
-rw-r--r-- | win32_threads.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/pthread_support.c b/pthread_support.c index 3d8a928b..7bf782fd 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -418,8 +418,6 @@ STATIC void * GC_mark_thread(void * id) } } -STATIC pthread_t GC_mark_threads[MAX_MARKERS]; - #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 */ @@ -521,8 +519,10 @@ GC_INNER void GC_start_mark_threads_inner(void) GC_markers_m1 = available_markers_m1; for (i = 0; i < available_markers_m1; ++i) { - if (0 != REAL_FUNC(pthread_create)(GC_mark_threads + i, &attr, - GC_mark_thread, (void *)(word)i)) { + pthread_t new_thread; + + if (REAL_FUNC(pthread_create)(&new_thread, &attr, GC_mark_thread, + (void *)(word)i) != 0) { WARN("Marker thread %" WARN_PRIdPTR " creation failed\n", i); /* Don't try to create other marker threads. */ GC_markers_m1 = i; diff --git a/win32_threads.c b/win32_threads.c index 3e5cdaf0..a45bddc8 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1936,8 +1936,6 @@ GC_INNER void GC_get_next_stack(char *start, char *limit, # define UNSET_MARK_LOCK_HOLDER (void)0 # endif - /* GC_mark_threads[] is unused here unlike that in pthread_support.c */ - static int available_markers_m1 = 0; # ifdef GC_PTHREADS_PARAMARK |