diff options
| author | Alfred Perlstein <alfred@FreeBSD.org> | 2000-08-13 01:30:36 +0000 |
|---|---|---|
| committer | Alfred Perlstein <alfred@FreeBSD.org> | 2000-08-13 01:30:36 +0000 |
| commit | 022daa34f2cdb146001da33281b68b83ed95c0ee (patch) | |
| tree | ffe920c7bf029feaca7cafd3f30079458be17610 /lib/libpthread/thread/thr_mutex.c | |
| parent | 74e60901272f9173d7e6fa98673aa626cf535333 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_mutex.c')
| -rw-r--r-- | lib/libpthread/thread/thr_mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 12fdc8e697b8..b8877f8453c9 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -753,7 +753,7 @@ mutex_unlock_common(pthread_mutex_t * mutex, int add_reference) ret = (*mutex)->m_owner == NULL ? EINVAL : EPERM; } else if (((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE) && - ((*mutex)->m_data.m_count > 1)) { + ((*mutex)->m_data.m_count > 0)) { /* Decrement the count: */ (*mutex)->m_data.m_count--; } else { @@ -821,7 +821,7 @@ mutex_unlock_common(pthread_mutex_t * mutex, int add_reference) ret = (*mutex)->m_owner == NULL ? EINVAL : EPERM; } else if (((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE) && - ((*mutex)->m_data.m_count > 1)) { + ((*mutex)->m_data.m_count > 0)) { /* Decrement the count: */ (*mutex)->m_data.m_count--; } else { @@ -939,7 +939,7 @@ mutex_unlock_common(pthread_mutex_t * mutex, int add_reference) ret = (*mutex)->m_owner == NULL ? EINVAL : EPERM; } else if (((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE) && - ((*mutex)->m_data.m_count > 1)) { + ((*mutex)->m_data.m_count > 0)) { /* Decrement the count: */ (*mutex)->m_data.m_count--; } else { |
