summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp5
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/os.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp
index 3a618a124de..9017e8dc7d8 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp
@@ -67,8 +67,9 @@ namespace ArchRast
char buf[255];
// There could be multiple threads creating thread pools. We
// want to make sure they are uniquly identified by adding in
- // the creator's thread id into the filename.
- sprintf(buf, "%s/ar_event%d_%d.bin", "/tmp", GetCurrentThreadId(), id);
+ // the creator's thread (process) id into the filename.
+ // Assumes a 1:1 thread:LWP mapping as in linux.
+ sprintf(buf, "%s/ar_event%d_%d.bin", "/tmp", GetCurrentProcessId(), id);
mFilename = std::string(buf);
#endif
}
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
index a16f5779d82..dc90fca7501 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -237,8 +237,6 @@ 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 InterlockedCompareExchange(Dest, Exchange, Comparand) __sync_val_compare_and_swap(Dest, Comparand, Exchange)
#define InterlockedExchangeAdd(Addend, Value) __sync_fetch_and_add(Addend, Value)