gallium/os_thread: simplify helper pipe_current_thread_get_time_nano
authorMarek Olšák <marek.olsak@amd.com>
Thu, 6 Sep 2018 03:00:07 +0000 (23:00 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 7 Sep 2018 19:48:31 +0000 (15:48 -0400)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/os/os_thread.h

index f2629c5ffe592a44e45995566d437c06417203c5..322888b825f0b3f175daaffc3cbaf2beae27f1e9 100644 (file)
@@ -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_ */