mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 02:34:00 +00:00
[c-host] DXGI profiled and tuned again :)
This commit is contained in:
@@ -19,13 +19,17 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#pragma once
|
||||
|
||||
#if defined(__GCC__) || defined(__GNUC__)
|
||||
#define INTERLOCKED_AND8 __sync_fetch_and_and
|
||||
#define INTERLOCKED_OR8 __sync_fetch_and_or
|
||||
#define INTERLOCKED_INC(x) __sync_fetch_and_add((x), 1)
|
||||
#define INTERLOCKED_DEC(x) __sync_fetch_and_sub((x), 1)
|
||||
#define INTERLOCKED_AND8 __sync_fetch_and_and
|
||||
#define INTERLOCKED_OR8 __sync_fetch_and_or
|
||||
#define INTERLOCKED_INC(x) __sync_fetch_and_add((x), 1)
|
||||
#define INTERLOCKED_DEC(x) __sync_fetch_and_sub((x), 1)
|
||||
#define INTERLOCKED_GET(x) __sync_fetch_and_add((x), 0)
|
||||
#define INTERLOCKED_CE(x, c, v) __sync_val_compare_and_swap((x), (c), (v))
|
||||
#else
|
||||
#define INTERLOCKED_OR8 InterlockedOr8
|
||||
#define INTERLOCKED_AND8 InterlockedAnd8
|
||||
#define INTERLOCKED_INC InterlockedIncrement
|
||||
#define INTERLOCKED_DEC InterlockedDecrement
|
||||
#endif
|
||||
#define INTERLOCKED_OR8 InterlockedOr8
|
||||
#define INTERLOCKED_AND8 InterlockedAnd8
|
||||
#define INTERLOCKED_INC InterlockedIncrement
|
||||
#define INTERLOCKED_DEC InterlockedDecrement
|
||||
#define INTERLOCKED_GET(x) InterlockedAdd((x), 0)
|
||||
#define INTERLOCKED_CE(x, c, v) InterlockedCompareExchange((x), (v), (c))
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user