diff options
Diffstat (limited to 'boehm-gc/solaris_threads.c')
-rw-r--r-- | boehm-gc/solaris_threads.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/boehm-gc/solaris_threads.c b/boehm-gc/solaris_threads.c index 5f05b19e008..0a07690a27a 100644 --- a/boehm-gc/solaris_threads.c +++ b/boehm-gc/solaris_threads.c @@ -16,9 +16,12 @@ */ /* Boehm, September 14, 1994 4:44 pm PDT */ -# if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS) +# if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS) \ + || defined(GC_THREADS) +# include "private/gc_priv.h" +# endif -# include "private/gc_priv.h" +# if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS) # include "private/solaris_threads.h" # include <thread.h> # include <synch.h> @@ -786,6 +789,7 @@ void GC_thr_init(void) { GC_thread t; thread_t tid; + int ret; if (GC_thr_initialized) return; @@ -803,9 +807,11 @@ void GC_thr_init(void) t = GC_new_thread(thr_self()); t -> stack_size = 0; t -> flags = DETACHED | CLIENT_OWNS_STACK; - if (thr_create(0 /* stack */, 0 /* stack_size */, GC_thr_daemon, - 0 /* arg */, THR_DETACHED | THR_DAEMON, - &tid /* thread_id */) != 0) { + ret = thr_create(0 /* stack */, 0 /* stack_size */, GC_thr_daemon, + 0 /* arg */, THR_DETACHED | THR_DAEMON, + &tid /* thread_id */); + if (ret != 0) { + GC_err_printf1("Thr_create returned %ld\n", ret); ABORT("Cant fork daemon"); } thr_setprio(tid, 126); |