[Gc] GC 6.4 vs Irix w/ threads

Hans Boehm Hans.Boehm at hp.com
Mon Apr 11 04:39:52 PDT 2005


GC6.4 apparently no longer worked on Irix with threads.  Apparently
a bug in aix_irix_threads.c was no longer hidden by a very lenient
pthread_attr_getdetachstate.

The following patch should solve the problem.

Hans

--- aix_irix_threads.c.orig     Sat Apr  9 20:37:22 2005
+++ aix_irix_threads.c  Sat Apr  9 20:38:17 2005
@@ -580,7 +580,11 @@
     si -> start_routine = start_routine;
     si -> arg = arg;

-    pthread_attr_getdetachstate(attr, &detachstate);
+    if (NULL == attr) {
+       detachstate = PTHREAD_CREATE_JOINABLE;
+    } else {
+        pthread_attr_getdetachstate(attr, &detachstate);
+    }
     if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED;
     si -> flags = my_flags;
     result = pthread_create(new_thread, attr, GC_start_routine, si);




More information about the Gc mailing list