]> granicus.if.org Git - gc/commitdiff
2005-04-06 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Wed, 6 Apr 2005 14:04:22 +0000 (14:04 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:24:59 +0000 (15:24 +0400)
* include/gc_pthread_redirects.h (pthread_detach): Override pthread_detach too.

* solaris_pthreads.c (GC_pthread_detach): Override pthread_detach too. Fixes
#74223.

svn path=/trunk/mono/; revision=42606

ChangeLog
include/gc_pthread_redirects.h
solaris_pthreads.c

index 863d9db0de369a949964b5431408bda0388dc2e6..2de5f51963e2110743269d9272484e6ffe669687 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-06  Zoltan Varga  <vargaz@freemail.hu>
+
+       * 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  <vargaz@freemail.hu>
 
        * os_dep.c: Add ability to fall back to mmap-ing memory when sbrk
index 842518cfcc48c2a0657b1cc6581994abf5cd8a44..5cc8d4734021095d7862e6d8f4fc56a3f16e903c 100644 (file)
                                 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)
index bae77193593f5e963ccd7b1531f3bb774840a802..742433a5dd3681a657cefed2ba82087f2b2d8275 100644 (file)
@@ -63,6 +63,17 @@ int GC_pthread_join(pthread_t wait_for, void **status)
        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,