mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Fix semantics for atomic operations on linux (return result of op)
This commit is contained in:
@@ -49,17 +49,17 @@ namespace Atomic
|
||||
{
|
||||
int32_t Inc32(volatile int32_t *i)
|
||||
{
|
||||
return __sync_fetch_and_add(i, int32_t(1));
|
||||
return __sync_add_and_fetch(i, int32_t(1));
|
||||
}
|
||||
|
||||
int64_t Inc64(volatile int64_t *i)
|
||||
{
|
||||
return __sync_fetch_and_add(i, int64_t(1));
|
||||
return __sync_add_and_fetch(i, int64_t(1));
|
||||
}
|
||||
|
||||
int64_t Dec64(volatile int64_t *i)
|
||||
{
|
||||
return __sync_fetch_and_add(i, int64_t(-1));
|
||||
return __sync_add_and_fetch(i, int64_t(-1));
|
||||
}
|
||||
|
||||
int64_t ExchAdd64(volatile int64_t *i, int64_t a)
|
||||
|
||||
Reference in New Issue
Block a user