aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/common
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-09-20 23:55:24 -0500
committerTim Rowley <[email protected]>2016-10-03 09:56:47 -0500
commit33a1a09eb0d59487748c0a27760f9e352f89b700 (patch)
treec02a4bbcf5501d5dfde98b6dfb404e9318083784 /src/gallium/drivers/swr/rasterizer/common
parent2fef0d108aa52e5e7e7c2b394d18131952a829a6 (diff)
swr: [rasterizer common] os.h portability header changes
- Fix conflict between windows MemoryFence and llvm::sys::MemoryFence - Declare gettid() Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/common')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/os.h6
1 files changed, 6 insertions, 0 deletions
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 <intrin.h>
#include <cstdint>
+#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)