Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /pthread_mutex_trylock.c [5af9e8] .. [1e0bb8] Maximize Restore

  Switch to side-by-side view

--- a/pthread_mutex_trylock.c
+++ b/pthread_mutex_trylock.c
@@ -69,10 +69,10 @@
   if (kind >= 0)
     {
       /* Non-robust */
-      if (0 == (PTW32_INTERLOCKED_VALUE) PTW32_INTERLOCKED_COMPARE_EXCHANGE (
+      if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG (
 		         (PTW32_INTERLOCKED_PTR) &mx->lock_idx,
-		         (PTW32_INTERLOCKED_VALUE) 1,
-		         (PTW32_INTERLOCKED_VALUE) 0))
+		         (PTW32_INTERLOCKED_LONG) 1,
+		         (PTW32_INTERLOCKED_LONG) 0))
         {
           if (kind != PTHREAD_MUTEX_NORMAL)
 	    {
@@ -103,10 +103,10 @@
       pthread_t self;
       ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent;
 
-      if ((PTW32_INTERLOCKED_VALUE)PTW32_ROBUST_NOTRECOVERABLE ==
-                  PTW32_INTERLOCKED_EXCHANGE_ADD(
+      if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE ==
+                  PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(
                     (PTW32_INTERLOCKED_PTR)statePtr,
-                    (PTW32_INTERLOCKED_VALUE)0))
+                    (PTW32_INTERLOCKED_LONG)0))
         {
           return ENOTRECOVERABLE;
         }
@@ -114,10 +114,10 @@
       self = pthread_self();
       kind = -kind - 1; /* Convert to non-robust range */
 
-      if (0 == (PTW32_INTERLOCKED_VALUE) PTW32_INTERLOCKED_COMPARE_EXCHANGE (
+      if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG (
         	         (PTW32_INTERLOCKED_PTR) &mx->lock_idx,
-        	         (PTW32_INTERLOCKED_VALUE) 1,
-        	         (PTW32_INTERLOCKED_VALUE) 0))
+        	         (PTW32_INTERLOCKED_LONG) 1,
+        	         (PTW32_INTERLOCKED_LONG) 0))
         {
           if (kind != PTHREAD_MUTEX_NORMAL)
             {