Mesa (master): Android: use bionic pthread_barrier_* if possible
Emil Velikov
evelikov at kemper.freedesktop.org
Mon Jun 5 13:12:50 UTC 2017
Module: Mesa
Branch: master
Commit: bb0452442a77570fce529cbb3d9fd99a94f3b50e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb0452442a77570fce529cbb3d9fd99a94f3b50e
Author: Chih-Wei Huang <cwhuang at android-x86.org>
Date: Sun Jun 4 12:53:01 2017 +0800
Android: use bionic pthread_barrier_* if possible
The pthread_barrier_* functions were introduced to bionic
since Nougat.
Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
Acked-by: Tapani Pälli <tapani.palli at intel.com>
Acked-by: Emil Velikov <emil.velikov at collabora.com>
---
Android.common.mk | 1 +
src/gallium/auxiliary/os/os_thread.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Android.common.mk b/Android.common.mk
index 57c31fc7e9..44ad97b6be 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -44,6 +44,7 @@ LOCAL_CFLAGS += \
# It's likely due to a bug elsewhere, but let's temporarily add them
# here to fix the radeonsi build.
LOCAL_CFLAGS += \
+ -DANDROID_API_LEVEL=$(PLATFORM_SDK_VERSION) \
-DENABLE_SHADER_CACHE \
-D__STDC_CONSTANT_MACROS \
-D__STDC_LIMIT_MACROS \
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index b6e0698da6..0a238e5749 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -75,7 +75,7 @@ __pipe_mutex_assert_locked(mtx_t *mutex)
* pipe_barrier
*/
-#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && !defined(PIPE_OS_ANDROID)
+#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && (!defined(PIPE_OS_ANDROID) || ANDROID_API_LEVEL >= 24)
typedef pthread_barrier_t pipe_barrier;
More information about the mesa-commit
mailing list