From ec8290acdaea21b16d98f1ef5d4ae8a28ab2109a Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 3 Nov 2004 01:08:41 +0000 Subject: Mutex, semaphore, thread ID, test suite changes - see ChangeLogs --- pthread_detach.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pthread_detach.c') diff --git a/pthread_detach.c b/pthread_detach.c index a376cf2..df2c542 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -75,6 +75,7 @@ pthread_detach (pthread_t thread) */ { int result; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; /* This is the proper way to test for a valid thread. */ result = pthread_kill (thread, 0); @@ -83,14 +84,14 @@ pthread_detach (pthread_t thread) return result; } - if (thread->detachState == PTHREAD_CREATE_DETACHED) + if (tp->detachState == PTHREAD_CREATE_DETACHED) { result = EINVAL; } else { result = 0; - thread->detachState = PTHREAD_CREATE_DETACHED; + tp->detachState = PTHREAD_CREATE_DETACHED; } return (result); -- cgit v1.2.3