android里面打印出线程的id的函数是哪个阿 ?
解决方案 »
- android求教,急
- 客服端 开发
- android 视频播放有声音无图象是什么原因?
- android自学总结
- 如何响应按键来关闭WindowManger生成的FloatView
- androidUI控件放在Activity中的哪里合适?
- 用webview从网上扒数据下来,网页上编码是utf-8。我取下来之后个别文字显示的乱码。这个是什么情况?求解啊
- byte 转化 kb 为什么要加1023然后除以1024
- 百度定位API的定位数据获得
- 实现像QQ一样切换账号,对应所有activity数据 ui都会相应更新,怎么实现?
- android播放器问题
- android 控件 点击放大,关闭,缩小到原来大小
狂汉 我还搞了半年linux !!
#ifdef HAVE_ANDROID_OS /* valgrind is rejecting RT-priority create reqs */
if (threadPriority != PRIORITY_DEFAULT || threadName != NULL) {
// We could avoid the trampoline if there was a way to get to the
// android_thread_id_t (pid) from pthread_t
thread_data_t* t = new thread_data_t;
t->priority = threadPriority;
t->threadName = threadName ? strdup(threadName) : NULL;
t->entryFunction = entryFunction;
t->userData = userData;
entryFunction = (android_thread_func_t)&thread_data_t::trampoline;
userData = t;
}
#endif if (threadStackSize) {
pthread_attr_setstacksize(&attr, threadStackSize);
}
errno = 0;
pthread_t thread;
int result = pthread_create(&thread, &attr,
(android_pthread_entry)entryFunction, userData);
if (result != 0) {
LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
"(android threadPriority=%d)",
entryFunction, result, errno, threadPriority);
return 0;
} if (threadId != NULL) {
*threadId = (android_thread_id_t)thread; // XXX: this is not portable
}
return 1;
}android_thread_id_t androidGetThreadId()
{
return (android_thread_id_t)pthread_self();
}