Module: Mesa
Branch: master
Commit: 6d477bc5460eec14c6a0d047a0384c9ce5c7609b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d477bc5460eec14c6a0d047a0384c9ce5c7609b

Author: Marek Olšák <[email protected]>
Date:   Wed Sep  5 23:00:07 2018 -0400

gallium/os_thread: simplify helper pipe_current_thread_get_time_nano

Reviewed-by: Brian Paul <[email protected]>

---

 src/gallium/auxiliary/os/os_thread.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/os/os_thread.h 
b/src/gallium/auxiliary/os/os_thread.h
index f2629c5ffe..322888b825 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_ */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to