summaryrefslogtreecommitdiff
path: root/ptw32_MCS_lock.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-07 01:23:25 +0000
committerrpj <rpj>2011-03-07 01:23:25 +0000
commit247469c6f6a16681491ac3ee213e57efcdda6153 (patch)
tree524cb8b1365cea86e12d8bee9b1a2bd93df4e6a4 /ptw32_MCS_lock.c
parenta39dab139b7c301ffd5a5592c292123c54e686cd (diff)
exception handling and c++ casts
Diffstat (limited to 'ptw32_MCS_lock.c')
-rw-r--r--ptw32_MCS_lock.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c
index ff74efa..08bea49 100644
--- a/ptw32_MCS_lock.c
+++ b/ptw32_MCS_lock.c
@@ -229,11 +229,10 @@ ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * no
node->readyFlag = 0;
node->next = 0; /* initially, no successor */
- return ((PTW32_INTERLOCKED_LPLONG)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(
- (PTW32_INTERLOCKED_LPLONG)lock,
- (PTW32_INTERLOCKED_LPLONG)node,
- (PTW32_INTERLOCKED_LPLONG)0)
- == (PTW32_INTERLOCKED_LPLONG)0) ? 0 : EBUSY;
+ return ((PVOID)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((LPVOID volatile *)lock,
+ (PVOID)node,
+ (PVOID)0)
+ == (PVOID)0) ? 0 : EBUSY;
}
/*