From 559e1bc4051f90d7a014bd4e4f5649e136dec412 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 25 Mar 2011 09:22:50 +0000 Subject: Robust mutex streamlining --- pthread_mutex_unlock.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'pthread_mutex_unlock.c') 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. */ -- cgit v1.2.3