forked from OSchip/llvm-project
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
It's now the client's resposibility to add it in when needed llvm-svn: 71959
This commit is contained in:
parent
d3a69ceaaf
commit
48371650b6
|
@ -46,7 +46,7 @@ namespace llvm {
|
||||||
__sync_synchronize();
|
__sync_synchronize();
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef volatile uint32_t cas_flag;
|
typedef uint32_t cas_flag;
|
||||||
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
|
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
|
||||||
return __sync_val_compare_and_swap(dest, exc, c);
|
return __sync_val_compare_and_swap(dest, exc, c);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ namespace llvm {
|
||||||
OSMemoryBarrier();
|
OSMemoryBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef volatile int32_t cas_flag;
|
typedef int32_t cas_flag;
|
||||||
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
|
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
|
||||||
cas_flag old = *dest;
|
cas_flag old = *dest;
|
||||||
OSAtomicCompareAndSwap32(c, exc, dest);
|
OSAtomicCompareAndSwap32(c, exc, dest);
|
||||||
|
|
Loading…
Reference in New Issue