From 420671135237cdf40c98d2336fb8712b7f0a2861 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 18 Apr 2019 14:27:24 -0700 Subject: threads.h: Add C11 thread support. FreeBSD, glibc, and musl have all implemented C11 threads at this point. POSIX is looking at how to align with it. Probably time to jump on the bandwagon ourselves... Implemented in the same style as so we can provide this functionality even on older API levels. This does mean that this is strictly more expensive than calling pthread functions directly. Although this isn't in POSIX yet, assume that it's going to be basically the same as C11 and add the header test anyway. We should revisit this when POSIX actually adds . Test: new tests Change-Id: I8602d67ce71ca7f8ed1529daa0a8ea1feb083dd6 --- libc/include/android/api-level.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libc/include/android/api-level.h') diff --git a/libc/include/android/api-level.h b/libc/include/android/api-level.h index a17585768..af7cde1e3 100644 --- a/libc/include/android/api-level.h +++ b/libc/include/android/api-level.h @@ -100,6 +100,9 @@ __BEGIN_DECLS /** Names the "Q" API level (29), for comparisons against __ANDROID_API__. */ #define __ANDROID_API_Q__ 29 +/** Names the "R" API level (30), for comparisons against __ANDROID_API__. */ +#define __ANDROID_API_R__ 30 + /** * Returns the `targetSdkVersion` of the caller, or `__ANDROID_API_FUTURE__` * if there is no known target SDK version (for code not running in the -- cgit v1.2.3