37 #if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) 40 #if defined(_WIN32) || defined(_WIN64) 43 #define WIN32_LEAN_AND_MEAN 46 #undef WIN32_LEAN_AND_MEAN 52 #pragma intrinsic(_ReadWriteBarrier) 57 #include "../util_namespace.cuh" 74 #if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) 93 #else //__cplusplus > 199711L 98 typedef long Spinlock;
103 typedef int Spinlock;
110 __sync_synchronize();
120 return __sync_lock_test_and_set(Target, Value);
130 #endif // defined(_MSC_VER) 162 #endif // __cplusplus > 199711L __forceinline__ void Lock()
Optional outer namespace(s)
__forceinline__ void _ReadWriteBarrier()
volatile Spinlock lock
Lock member.
__forceinline__ void Unlock()
__forceinline__ void YieldProcessor()
__forceinline__ long _InterlockedExchange(volatile int *const Target, const int Value)