Author: zoltan
Date: 2005-04-06 10:04:22 -0400 (Wed, 06 Apr 2005)
New Revision: 42606
Modified:
trunk/mono/libgc/ChangeLog
trunk/mono/libgc/include/gc_pthread_redirects.h
trunk/mono/libgc/solaris_pthreads.c
Log:
2005-04-06 Zoltan Varga <[EMAIL PROTECTED]>
* include/gc_pthread_redirects.h (pthread_detach): Override
pthread_detach too.
* solaris_pthreads.c (GC_pthread_detach): Override pthread_detach too.
Fixes
#74223.
Modified: trunk/mono/libgc/ChangeLog
===================================================================
--- trunk/mono/libgc/ChangeLog 2005-04-06 14:02:14 UTC (rev 42605)
+++ trunk/mono/libgc/ChangeLog 2005-04-06 14:04:22 UTC (rev 42606)
@@ -1,3 +1,10 @@
+2005-04-06 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * include/gc_pthread_redirects.h (pthread_detach): Override
pthread_detach too.
+
+ * solaris_pthreads.c (GC_pthread_detach): Override pthread_detach too.
Fixes
+ #74223.
+
2005-03-29 Zoltan Varga <[EMAIL PROTECTED]>
* os_dep.c: Add ability to fall back to mmap-ing memory when sbrk
Modified: trunk/mono/libgc/include/gc_pthread_redirects.h
===================================================================
--- trunk/mono/libgc/include/gc_pthread_redirects.h 2005-04-06 14:02:14 UTC
(rev 42605)
+++ trunk/mono/libgc/include/gc_pthread_redirects.h 2005-04-06 14:04:22 UTC
(rev 42606)
@@ -35,8 +35,10 @@
const pthread_attr_t *attr,
void * (*thread_execp)(void *), void *arg);
extern int GC_pthread_join(pthread_t wait_for, void **status);
+ extern int GC_pthread_detach(pthread_t thread);
# define pthread_join GC_pthread_join
# define pthread_create GC_pthread_create
+# define pthread_detach GC_pthread_detach
#endif
#if defined(GC_SOLARIS_PTHREADS) || defined(GC_SOLARIS_THREADS)
Modified: trunk/mono/libgc/solaris_pthreads.c
===================================================================
--- trunk/mono/libgc/solaris_pthreads.c 2005-04-06 14:02:14 UTC (rev 42605)
+++ trunk/mono/libgc/solaris_pthreads.c 2005-04-06 14:04:22 UTC (rev 42606)
@@ -63,7 +63,18 @@
return GC_thr_join((thread_t)wait_for, NULL, status);
}
+int GC_pthread_detach(pthread_t thread)
+{
+ GC_thread t = GC_lookup_thread(thread);
+ if (t) {
+ t->flags |= DETACHED;
+ return 0;
+ }
+ else
+ return pthread_detach(thread);
+}
+
int
GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr_in,
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches