aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-09-07 16:42:00 -0400
committerMarek Olšák <[email protected]>2018-09-07 16:52:36 -0400
commit7ac52c2e38f3003aad236f97c843905e682008df (patch)
tree5e184e9cf6ae0b8694eaae35a5f33c2e3f56e44f /src/gallium
parent465e5a868cd58ca7c4ff7476e98231ffd4f3d2bf (diff)
Revert "gallium/os_thread: simplify helper pipe_current_thread_get_time_nano"
This reverts commit 6d477bc5460eec14c6a0d047a0384c9ce5c7609b. It fixes the Windows build hopefully.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index 322888b825f..f2629c5ffe5 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -165,7 +165,11 @@ pipe_tsd_set(pipe_tsd *tsd, void *value)
static inline int64_t
pipe_current_thread_get_time_nano(void)
{
- return u_thread_get_time_nano(thrd_current());
+#if defined(HAVE_PTHREAD)
+ return u_thread_get_time_nano(pthread_self());
+#else
+ return 0;
+#endif
}
#endif /* OS_THREAD_H_ */