- namespace atomic {
- __forceinline static bool cas(volatile cell *ptr, cell old_val, cell new_val)
- {
- return InterlockedCompareExchange64(
- reinterpret_cast<volatile LONG64 *>(ptr),
- (LONG64)old_val,
- (LONG64)new_val) == (LONG64)old_val;
- }
- __forceinline static bool cas(volatile fixnum *ptr, fixnum old_val, fixnum new_val)
- {
- return InterlockedCompareExchange64(
- reinterpret_cast<volatile LONG64 *>(ptr),
- (LONG64)old_val,
- (LONG64)new_val) == (LONG64)old_val;
- }
+namespace atomic {
+__forceinline static bool cas(volatile cell* ptr, cell old_val, cell new_val) {
+ return InterlockedCompareExchange64(reinterpret_cast<volatile LONG64*>(ptr),
+ (LONG64) old_val, (LONG64) new_val) ==
+ (LONG64) old_val;
+}
+__forceinline static bool cas(volatile fixnum* ptr, fixnum old_val,
+ fixnum new_val) {
+ return InterlockedCompareExchange64(reinterpret_cast<volatile LONG64*>(ptr),
+ (LONG64) old_val, (LONG64) new_val) ==
+ (LONG64) old_val;
+}