Mesa (master): util/u_thread: fix compilation on Mac OS

Nicolai Hähnle nh at kemper.freedesktop.org
Fri Nov 10 15:38:52 UTC 2017


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

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Fri Nov 10 12:36:16 2017 +0100

util/u_thread: fix compilation on Mac OS

Apparently, it doesn't have pthread barriers.

p_config.h (which was originally used to guard this code) uses the
__APPLE__ macro to detect Mac OS.

Fixes: f0d3a4de75 ("util: move pipe_barrier into src/util and rename to util_barrier")
Cc: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/util/u_thread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index e484d8aa74..26cc0b0934 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -104,7 +104,7 @@ static inline bool u_thread_is_self(thrd_t thread)
  * util_barrier
  */
 
-#if defined(HAVE_PTHREAD)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__)
 
 typedef pthread_barrier_t util_barrier;
 




More information about the mesa-commit mailing list