From 33a1a09eb0d59487748c0a27760f9e352f89b700 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Tue, 20 Sep 2016 23:55:24 -0500 Subject: swr: [rasterizer common] os.h portability header changes - Fix conflict between windows MemoryFence and llvm::sys::MemoryFence - Declare gettid() Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/common/os.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h index 43d55134222..f175a8a19e5 100644 --- a/src/gallium/drivers/swr/rasterizer/common/os.h +++ b/src/gallium/drivers/swr/rasterizer/common/os.h @@ -38,6 +38,11 @@ #include #include +#if defined(MemoryFence) +// Windows.h defines MemoryFence as _mm_mfence, but this conflicts with llvm::sys::MemoryFence +#undef MemoryFence +#endif + #define OSALIGN(RWORD, WIDTH) __declspec(align(WIDTH)) RWORD #define THREAD __declspec(thread) #define INLINE __forceinline @@ -211,6 +216,7 @@ void AlignedFree(void* p) #define sprintf_s sprintf #define strcpy_s(dst,size,src) strncpy(dst,src,size) #define GetCurrentProcessId getpid +pid_t gettid(void); #define GetCurrentThreadId gettid #define CreateDirectory(name, pSecurity) mkdir(name, 0777) -- cgit v1.2.3