Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libgc
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2005-04-06 18:04:22 +0400
committerZoltan Varga <vargaz@gmail.com>2005-04-06 18:04:22 +0400
commit0b521f3abab9b9cc2a556328024a21af90bc970f (patch)
tree591460c34c6c9497b4788991c57a5140c41f4a39 /libgc
parent14121e191e4fcc6ab366d1135a421de0f1b3207c (diff)
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. svn path=/trunk/mono/; revision=42606
Diffstat (limited to 'libgc')
-rw-r--r--libgc/ChangeLog7
-rw-r--r--libgc/include/gc_pthread_redirects.h2
-rw-r--r--libgc/solaris_pthreads.c11
3 files changed, 20 insertions, 0 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog
index f6ed8ef4112..976a9718060 100644
--- a/libgc/ChangeLog
+++ b/libgc/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
diff --git a/libgc/include/gc_pthread_redirects.h b/libgc/include/gc_pthread_redirects.h
index 842518cfcc4..5cc8d473402 100644
--- a/libgc/include/gc_pthread_redirects.h
+++ b/libgc/include/gc_pthread_redirects.h
@@ -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)
diff --git a/libgc/solaris_pthreads.c b/libgc/solaris_pthreads.c
index bae77193593..742433a5dd3 100644
--- a/libgc/solaris_pthreads.c
+++ b/libgc/solaris_pthreads.c
@@ -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,