Mesa (master): c11: Fix missing pthread_mutex_timedlock declaration warnings on MacOSX.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jan 23 13:45:01 UTC 2014


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Jan 23 13:42:38 2014 +0000

c11: Fix missing pthread_mutex_timedlock declaration warnings on MacOSX.

---

 include/c11/threads_posix.h |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
index 047e2ea..e54af39 100644
--- a/include/c11/threads_posix.h
+++ b/include/c11/threads_posix.h
@@ -41,7 +41,7 @@ Configuration macro:
     Use pthread_mutex_timedlock() for `mtx_timedlock()'
     Otherwise use mtx_trylock() + *busy loop* emulation.
 */
-#if !defined(__CYGWIN__)
+#if !defined(__CYGWIN__) && !defined(__APPLE__)
 #define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
 #endif
 
@@ -196,6 +196,12 @@ mtx_lock(mtx_t *mtx)
     return thrd_success;
 }
 
+static inline int
+mtx_trylock(mtx_t *mtx);
+
+static inline void
+thrd_yield(void);
+
 // 7.25.4.4
 static inline int
 mtx_timedlock(mtx_t *mtx, const xtime *xt)




More information about the mesa-commit mailing list