diff options
author | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
commit | ec8290acdaea21b16d98f1ef5d4ae8a28ab2109a (patch) | |
tree | 0bd3750ec1cc12594b6cfe69473e393da6ec101b /pthread_detach.c | |
parent | cccaf0c2c82e78a72d69a4a50c872f308bed2f65 (diff) |
Mutex, semaphore, thread ID, test suite changes - see ChangeLogs
Diffstat (limited to 'pthread_detach.c')
-rw-r--r-- | pthread_detach.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |