summaryrefslogtreecommitdiff
path: root/pthread_mutex_unlock.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-25 09:22:50 +0000
committerrpj <rpj>2011-03-25 09:22:50 +0000
commit559e1bc4051f90d7a014bd4e4f5649e136dec412 (patch)
tree70e6f76c3b353b0b74b698a51088f5b9a38e53ab /pthread_mutex_unlock.c
parent395de1c8a9a25c343a6784cfc3ecf729c48024d8 (diff)
Robust mutex streamlining
Diffstat (limited to 'pthread_mutex_unlock.c')
-rw-r--r--pthread_mutex_unlock.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c
index 7a3f009..5cd51af 100644
--- a/pthread_mutex_unlock.c
+++ b/pthread_mutex_unlock.c
@@ -125,18 +125,11 @@ pthread_mutex_unlock (pthread_mutex_t * mutex)
(LONG)PTW32_ROBUST_INCONSISTENT);
if (PTHREAD_MUTEX_NORMAL == kind)
{
-#if 1
- ptw32_robust_mutex_remove(mutex);
-#else
- mx->ownerThread.p = NULL;
-#endif
+ ptw32_robust_mutex_remove(mutex, NULL);
if ((LONG) PTW32_INTERLOCKED_EXCHANGE((LPLONG) &mx->lock_idx,
(LONG) 0) < 0)
{
-#if 0
- ptw32_robust_mutex_remove(mutex, self);
-#endif
/*
* Someone may be waiting on that mutex.
*/
@@ -151,18 +144,11 @@ pthread_mutex_unlock (pthread_mutex_t * mutex)
if (kind != PTHREAD_MUTEX_RECURSIVE
|| 0 == --mx->recursive_count)
{
-#if 1
- ptw32_robust_mutex_remove(mutex);
-#else
- mx->ownerThread.p = NULL;
-#endif
+ ptw32_robust_mutex_remove(mutex, NULL);
if ((LONG) PTW32_INTERLOCKED_EXCHANGE((LPLONG) &mx->lock_idx,
(LONG) 0) < 0)
{
-#if 0
- ptw32_robust_mutex_remove(mutex, self);
-#endif
/*
* Someone may be waiting on that mutex.
*/