From c3973648250aeb062d7d99a71257e2287c18a1ae Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Jul 2011 09:33:35 +0000 Subject: See the ChangeLog --- pthread_mutex_lock.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'pthread_mutex_lock.c') diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index b54e155..eee9abe 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -78,11 +78,11 @@ pthread_mutex_lock (pthread_mutex_t * mutex) if (PTHREAD_MUTEX_NORMAL == kind) { if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) 1) != 0) { while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) @@ -98,7 +98,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) pthread_t self = pthread_self(); if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) 1, (PTW32_INTERLOCKED_LONG) 0) == 0) { @@ -121,7 +121,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) else { while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) @@ -150,7 +150,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_PTR)statePtr, + (PTW32_INTERLOCKED_LONGPTR)statePtr, (PTW32_INTERLOCKED_LONG)0)) { result = ENOTRECOVERABLE; @@ -164,12 +164,12 @@ pthread_mutex_lock (pthread_mutex_t * mutex) if (PTHREAD_MUTEX_NORMAL == kind) { if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) 1) != 0) { while (0 == (result = ptw32_robust_mutex_inherit(mutex)) && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) @@ -179,7 +179,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_PTR)statePtr, + (PTW32_INTERLOCKED_LONGPTR)statePtr, (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ @@ -201,7 +201,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) else { if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) 1, (PTW32_INTERLOCKED_LONG) 0) == 0) { @@ -229,7 +229,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) { while (0 == (result = ptw32_robust_mutex_inherit(mutex)) && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_PTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) @@ -239,7 +239,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_PTR)statePtr, + (PTW32_INTERLOCKED_LONGPTR)statePtr, (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ -- cgit v1.2.3