Mesa (master): swr: [rasterizer common] os.h portability header changes
Tim Rowley
torowley at kemper.freedesktop.org
Mon Oct 3 16:29:37 UTC 2016
Module: Mesa
Branch: master
Commit: 33a1a09eb0d59487748c0a27760f9e352f89b700
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33a1a09eb0d59487748c0a27760f9e352f89b700
Author: Tim Rowley <timothy.o.rowley at intel.com>
Date: Tue Sep 20 23:55:24 2016 -0500
swr: [rasterizer common] os.h portability header changes
- Fix conflict between windows MemoryFence and llvm::sys::MemoryFence
- Declare gettid()
Signed-off-by: Tim Rowley <timothy.o.rowley at intel.com>
---
src/gallium/drivers/swr/rasterizer/common/os.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
index 43d5513..f175a8a 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)
More information about the mesa-commit
mailing list