See https://android.googlesource.com/platform/bionic/+/master/docs/status.md our official documents about what version of Android.
You can also look at the <pthread.h> header in the NDK (the current version is here ) and see, for example, such entries:
pid_t pthread_gettid_np(pthread_t __pthread) __INTRODUCED_IN(21);
this shows that we have a non-POSIX / non-portable ( _np ) _np pthread_gettid_np , but it was introduced in the API level 21, so if your code should work on older releases, you can don't use this.
Mostly the headers are the canonical source of the truth for "what features are available at which API levels?"
for the specific case pthread_getaffinity_np not, we do not support it. You can combine pthread_gettid_np from <pthread.h> and sched_getaffinity from <sched.h> .
source share