aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/codegen/templates
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-07-21 11:38:39 -0500
committerTim Rowley <[email protected]>2017-07-21 15:37:56 -0500
commitd1e7153228304eb1be85580cbfdea1a57c5f203b (patch)
treedcf2bb31edd3b4769324aa90e1f4837ff1cdc3c5 /src/gallium/drivers/swr/rasterizer/codegen/templates
parenteaa56eab6da565c7bc84419c025c7c9bc90cf87a (diff)
swr/rast: quit using linux-specific gettid()
Linux-specific gettid() syscall shouldn't be used in portable code. Fix does assume a 1:1 thread:LWP architecture, but works for our current target platforms and can be revisited later if needed. Fixes unresolved symbol in linux scons builds. v2: add comment in code about the 1:1 assumption. Cc: [email protected] Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/codegen/templates')
-rw-r--r--src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_eventhandlerfile.hpp5
1 files changed, 3 insertions, 2 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
}