|
@@ -1302,7 +1302,11 @@ bool cmThPtrCAS( void* addr, void* old, void* neww )
|
1302
|
1302
|
union
|
1303
|
1303
|
{
|
1304
|
1304
|
void* addr;
|
|
1305
|
+#ifdef OS_64
|
1305
|
1306
|
int64_t val;
|
|
1307
|
+#else
|
|
1308
|
+ int val;
|
|
1309
|
+#endif
|
1306
|
1310
|
} u;
|
1307
|
1311
|
} s_t;
|
1308
|
1312
|
|
|
@@ -1310,10 +1314,11 @@ bool cmThPtrCAS( void* addr, void* old, void* neww )
|
1310
|
1314
|
|
1311
|
1315
|
ov.u.addr = old;
|
1312
|
1316
|
nv.u.addr = neww;
|
1313
|
|
-
|
|
1317
|
+#ifdef OS_64
|
1314
|
1318
|
int rv = OSAtomicCompareAndSwap64Barrier(ov.u.val,nv.u.val,(int64_t*)addr);
|
1315
|
|
-
|
1316
|
|
- //int rv = OSAtomicCompareAndSwapPtrBarrier(old,neww,&addr);
|
|
1319
|
+#else
|
|
1320
|
+ int rv = OSAtomicCompareAndSwap32Barrier(ov.u.val,nv.u.val,(int*)addr);
|
|
1321
|
+#endif
|
1317
|
1322
|
return rv;
|
1318
|
1323
|
#endif
|
1319
|
1324
|
|