From 1e0bb8a09c86d144f3779bc4d5724afe3f637922 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Jul 2011 00:51:56 +0000 Subject: Redo Interlocked macros; see the ChangeLog --- pthread_mutex_consistent.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pthread_mutex_consistent.c') diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 0f63d1b..ac17dd8 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -80,10 +80,10 @@ ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) pthread_mutex_t mx = *mutex; ptw32_robust_node_t* robust = mx->robustNode; - switch ((LONG)(size_t)PTW32_INTERLOCKED_COMPARE_EXCHANGE( + switch ((LONG)PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( (PTW32_INTERLOCKED_PTR)&robust->stateInconsistent, - (PTW32_INTERLOCKED_VALUE)PTW32_ROBUST_INCONSISTENT, - (PTW32_INTERLOCKED_VALUE)-1 /* The terminating thread sets this */)) + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT, + (PTW32_INTERLOCKED_LONG)-1 /* The terminating thread sets this */)) { case -1L: result = EOWNERDEAD; @@ -177,10 +177,10 @@ pthread_mutex_consistent (pthread_mutex_t* mutex) } if (mx->kind >= 0 - || (PTW32_INTERLOCKED_VALUE)PTW32_ROBUST_INCONSISTENT != PTW32_INTERLOCKED_COMPARE_EXCHANGE( + || (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT != PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( (PTW32_INTERLOCKED_PTR)&mx->robustNode->stateInconsistent, - (PTW32_INTERLOCKED_VALUE)PTW32_ROBUST_CONSISTENT, - (PTW32_INTERLOCKED_VALUE)PTW32_ROBUST_INCONSISTENT)) + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_CONSISTENT, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT)) { result = EINVAL; } -- cgit v1.2.3