请问andoid 是否支持isolcpus将arm的某个核隔离?
我想实现在arm的某个指定核上跑一个单独的线程,该核为该线程独占。
另外,在实现过程中,需要用cpu亲和性去绑定特定线程,发现android NDK不支持thread_setaffinity_np接口,请问哪位有解决办法?
dongshengcui@vizum-VirtualBox:~/qwz/bind$ aarch64-linux-android-g++ bindThread.c -o bindThread -lpthread
bindThread.c: In function 'void myfun(void)':
bindThread.c:23:71: error: 'pthread_setaffinity_np' was not declared in this scope
if (pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) < 0) {
^
bindThread.c:27:69: error: 'pthread_getaffinity_np' was not declared in this scope
if (pthread_getaffinity_np(pthread_self(), sizeof(get), &get) < 0) {
^
dongshengcui@vizum-VirtualBox:~/qwz/bind$