Commit 67367f4c authored by js908001's avatar js908001

Fixing GCC builtin atomics cast problem

parent 2f7a00ab
......@@ -90,8 +90,10 @@ void atomic_read32(volatile void* src, void* dest) {
*((int32_t*) dest) = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
}
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value) {
return __sync_bool_compare_and_swap((volatile int32_t*)dest, (int32_t*)expected_value, (int32_t*)new_value);
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value)
{
return __sync_bool_compare_and_swap( &dest, expected_value, new_value );
//return __sync_bool_compare_and_swap( (volatile int32_t*)dest, (int32_t*)expected_value, (int32_t*)new_value );
}
int atomic_inc_int(volatile int* dest) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment