aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2004-05-20 11:55:04 +0000
committerMike Makonnen <mtm@FreeBSD.org>2004-05-20 11:55:04 +0000
commit7295f69667cd1888c824ffcf104fa51670ba6e99 (patch)
treeb981a6b3049c24958f111e4a0fd0b9df53f33c7d /lib
parent1df1a825418f179b5d09587367182a81397596ff (diff)
downloadsrc-7295f69667cd1888c824ffcf104fa51670ba6e99.tar.gz
src-7295f69667cd1888c824ffcf104fa51670ba6e99.zip
q§
Notes
Notes: svn path=/head/; revision=129482
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_mutex.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 94c6c257ad28..8bf68c1ffbe4 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -379,6 +379,9 @@ retry:
goto out;
}
+ if ((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE)
+ (*mutex)->m_data.m_count++;
+
/*
* The mutex is now owned by curthread.
*/
@@ -644,14 +647,9 @@ mutex_self_lock(pthread_mutex_t mutex, int noblock)
PANIC("Shouldn't resume here?\n");
break;
- case PTHREAD_MUTEX_RECURSIVE:
- /* Increment the lock count: */
- mutex->m_data.m_count++;
- break;
-
default:
- /* Trap invalid mutex types; */
- return (EINVAL);
+ /* Do Nothing */
+ break;
}
return (0);
}