Commit f8bf9091 by Derek Mauro Committed by Copybara-Service

Support pthread_cond_clockwait() and sem_clockwait() on Android

for __ANDROID_API__ >= 30

https://android.googlesource.com/platform/bionic/+/69010802d037dbc10377416bd9cc696fa34b9384%5E%21/libc/include/pthread.h

PiperOrigin-RevId: 525815479
Change-Id: I88cd1a06a4f7bb5380ff7c1e6a8f45e2b04b7df8
parent 9686b7be
......@@ -81,6 +81,8 @@ PthreadWaiter::PthreadWaiter() : waiter_count_(0), wakeup_count_(0) {
#if defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 30))
#define ABSL_INTERNAL_HAVE_PTHREAD_COND_CLOCKWAIT 1
#elif defined(__ANDROID_API__) && __ANDROID_API__ >= 30
#define ABSL_INTERNAL_HAVE_PTHREAD_COND_CLOCKWAIT 1
#endif
// Calls pthread_cond_timedwait() or possibly something else like
......
......@@ -46,6 +46,8 @@ SemWaiter::SemWaiter() : wakeups_(0) {
#if defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 30))
#define ABSL_INTERNAL_HAVE_SEM_CLOCKWAIT 1
#elif defined(__ANDROID_API__) && __ANDROID_API__ >= 30
#define ABSL_INTERNAL_HAVE_SEM_CLOCKWAIT 1
#endif
// Calls sem_timedwait() or possibly something else like
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment