1 // RUN: %clangxx -O0 %s -o %t && %run %t
3 // Android does not implement pthread_getaffinity_np.
4 // (Note: libresolv is integrated with libc, but apparently only
6 // UNSUPPORTED: android
10 #include <sys/sysinfo.h>
12 #include <sanitizer/msan_interface.h>
16 pthread_t tid
= pthread_self();
17 int res
= pthread_getaffinity_np(tid
, sizeof(set_x
), set_x
);
19 int cpus
= CPU_COUNT_S(sizeof(set_x
), set_x
);
20 assert(cpus
> 0 && cpus
<= get_nprocs());