OSDN Git Service

* config/vax/vax.h (CASE_DROPS_THROUGH): Don't define.
[pf3gnuchains/gcc-fork.git] / boehm-gc / solaris_threads.c
index 5f05b19..b599c58 100644 (file)
@@ -16,9 +16,9 @@
  */
 /* Boehm, September 14, 1994 4:44 pm PDT */
 
-# if defined(GC_SOLARIS_THREADS) || defined(GC_SOLARIS_PTHREADS)
+#include "private/gc_priv.h"
 
-# 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 +786,7 @@ void GC_thr_init(void)
 {
     GC_thread t;
     thread_t tid;
+    int ret;
 
     if (GC_thr_initialized)
            return;
@@ -803,9 +804,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);