* Modified by Peter C. for Solaris Posix Threads.
*/
-# if defined(GC_SOLARIS_PTHREADS)
# include "private/gc_priv.h"
+
+# if defined(GC_SOLARIS_PTHREADS)
+
+/* Avoid #error"Cannot use procfs in the large file compilation environment" */
+#if defined(_ILP32) && (_FILE_OFFSET_BITS != 32)
+#undef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 32
+#endif
+
# include <pthread.h>
# include <thread.h>
# include <signal.h>
return GC_thr_join((thread_t)wait_for, NULL, status);
}
+int GC_pthread_detach(pthread_t thread)
+{
+ GC_thread t;
+
+ LOCK();
+ t=GC_lookup_thread(thread);
+ UNLOCK();
+ if (t) {
+ LOCK();
+ t->flags |= DETACHED;
+ UNLOCK();
+ return 0;
+ }
+ else
+ return pthread_detach(thread);
+}
int
GC_pthread_create(pthread_t *new_thread,