1 // RUN: %clangxx -O0 %s -o %t && %run %t 2 3 // UNSUPPORTED: android 4 5 #include <assert.h> 6 #include <pthread.h> 7 #include <sys/sysinfo.h> 8 9 #include <sanitizer/msan_interface.h> 10 11 int main() { 12 cpu_set_t set_x; 13 int res = pthread_getaffinity_np(pthread_self(), sizeof(set_x), &set_x); 14 assert(res == 0); 15 assert(CPU_COUNT_S(sizeof(set_x), &set_x) == get_nprocs()); 16 17 return 0; 18 } 19