summaryrefslogtreecommitdiff
path: root/pthread_mutex_destroy.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-10-01 07:17:09 +0000
committerrpj <rpj>2004-10-01 07:17:09 +0000
commitb0cf9efa6afeb8a7dbddf124dae173a2d633c801 (patch)
tree8f208f15bd63cf69ae9e2ceb2d523296db8bca76 /pthread_mutex_destroy.c
parent531ca4db4794aab863a898b4d079ccd59b424b25 (diff)
Mutex speedups
Diffstat (limited to 'pthread_mutex_destroy.c')
-rw-r--r--pthread_mutex_destroy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c
index a777598..c2289d0 100644
--- a/pthread_mutex_destroy.c
+++ b/pthread_mutex_destroy.c
@@ -44,10 +44,9 @@ pthread_mutex_destroy (pthread_mutex_t * mutex)
int result = 0;
pthread_mutex_t mx;
- if (mutex == NULL || *mutex == NULL)
- {
- return EINVAL;
- }
+ /*
+ * Let the system deal with invalid pointers.
+ */
/*
* Check to see if we have something to delete.
@@ -64,7 +63,7 @@ pthread_mutex_destroy (pthread_mutex_t * mutex)
*/
if (result == 0)
{
- if (1 == mx->recursive_count)
+ if (mx->kind != PTHREAD_MUTEX_RECURSIVE || 1 == mx->recursive_count)
{
/*
* FIXME!!!