diff options
author | rpj <rpj> | 2004-10-16 02:34:44 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-10-16 02:34:44 +0000 |
commit | 45b1b8cb2a6588f9316f780d8cefe11c181a9a17 (patch) | |
tree | 24753e298d9933d48d764177baf183ef97f04156 /pthread_mutex_destroy.c | |
parent | 9da8fdcb33373b4b2e1de2a8b7af3ed4b5811245 (diff) |
Mutex speedups cont'd
Diffstat (limited to 'pthread_mutex_destroy.c')
-rw-r--r-- | pthread_mutex_destroy.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 1ff9ebe..4b0043a 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -82,8 +82,15 @@ pthread_mutex_destroy (pthread_mutex_t * mutex) if (result == 0) { - (void) sem_destroy (&mx->wait_sema); - free (mx); + if (!CloseHandle (mx->event)) + { + *mutex = mx; + result = EINVAL; + } + else + { + free (mx); + } } else { |