From 047478962b8387a0542365a5ea01a828707f3ed4 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Wed, 6 Apr 2005 14:21:51 +0000 Subject: [PATCH] 2005-04-06 Zoltan Varga * solaris_pthreads.c (GC_pthread_detach): Add locking. svn path=/trunk/mono/; revision=42607 --- ChangeLog | 2 ++ solaris_pthreads.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2de5f519..a5879fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-04-06 Zoltan Varga + * solaris_pthreads.c (GC_pthread_detach): Add locking. + * include/gc_pthread_redirects.h (pthread_detach): Override pthread_detach too. * solaris_pthreads.c (GC_pthread_detach): Override pthread_detach too. Fixes diff --git a/solaris_pthreads.c b/solaris_pthreads.c index 742433a5..819454b4 100644 --- a/solaris_pthreads.c +++ b/solaris_pthreads.c @@ -65,10 +65,15 @@ int GC_pthread_join(pthread_t wait_for, void **status) int GC_pthread_detach(pthread_t thread) { - GC_thread t = GC_lookup_thread(thread); + GC_thread t; + LOCK(); + t=GC_lookup_thread(thread); + UNLOCK(); if (t) { + LOCK(); t->flags |= DETACHED; + UNLOCK(); return 0; } else -- 2.40.0