blob: 1c0f63866b9a514c62f21bf343a0199b17e3688d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "Interlocked.hpp"
#ifdef CRU_WINDOWS
#include <Windows.h>
#else
#endif
namespace cru {
void InterlockedAdd(volatile long long *v, long long a) {
#ifdef CRU_WINDOWS
InterlockedAdd64(v, a);
#else
__sync_fetch_and_add(v, a);
#endif
}
} // namespace cru
|