From 0bd4fc137b7ba0218159b8ded673efcb9c404ce1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 30 Mar 2007 00:49:11 +0000 Subject: Correct a race condition in the pthread join logic. Sometimes the join structure was being deallocated while it was still needed. git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@180 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/pthread_detach.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nuttx/sched/pthread_detach.c') diff --git a/nuttx/sched/pthread_detach.c b/nuttx/sched/pthread_detach.c index ca3f732f4..a1a60acf5 100644 --- a/nuttx/sched/pthread_detach.c +++ b/nuttx/sched/pthread_detach.c @@ -109,9 +109,7 @@ int pthread_detach(pthread_t thread) { /* YES.. just remove the thread entry. */ - (void)pthread_removejoininfo((pid_t)thread); - sched_free(pjoin); - pjoin = NULL; + pthread_destroyjoin(pjoin); } else { -- cgit v1.2.3