error: 'pthread_getaffinity_np' was not declared in this scopeconst int err = pthread_getaffinity_np(_pthreadID,sizeof(cpu_set_t),&cpuSetMask);compilation terminated due to -Wfatal-errors.
我已经检查了ndk工具链中包含的pthread的标题,我没有找到pthread_getaffinity_np函数的声明.
AndroID的pthread功能是否有限?如何正确使用pthread与AndroID NDK?
解决方法 AndroID的pthread功能是否有限?AFAIK,是的.
http://mobilepearls.com/labs/native-android-api/#pthreads
POSIX threads (pthreads)The androID libc,bionic,provIDes built-in support for pthreads,so noadditional linking (-lpthreads) is necessary. It does not implement fullPOSIX threads functionality and leaves out support for read/write locks,pthread_cancel(),process-shared mutexes and condition variables as well asother more advanced features. Read the bionic OVERVIEW.txt for moreinformation.TLS,thread-local storage,is limited to 59 pthread_key_t slots availableto applications,lower than the posix minimum of 128.总结
以上是内存溢出为你收集整理的Android NDK和pthread全部内容,希望文章能够帮你解决Android NDK和pthread所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)