summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os/os_thread.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-09-05 23:00:07 -0400
committerMarek Olšák <[email protected]>2018-09-07 15:48:31 -0400
commit6d477bc5460eec14c6a0d047a0384c9ce5c7609b (patch)
treec958098d10b490984842db7c551e52b0725be2fa /src/gallium/auxiliary/os/os_thread.h
parent15fa2c5e359149a0b67b8572cd7dab87626b48ae (diff)
gallium/os_thread: simplify helper pipe_current_thread_get_time_nano
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/os/os_thread.h')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index f2629c5ffe5..322888b825f 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -165,11 +165,7 @@ pipe_tsd_set(pipe_tsd *tsd, void *value)
static inline int64_t
pipe_current_thread_get_time_nano(void)
{
-#if defined(HAVE_PTHREAD)
- return u_thread_get_time_nano(pthread_self());
-#else
- return 0;
-#endif
+ return u_thread_get_time_nano(thrd_current());
}
#endif /* OS_THREAD_H_ */