动态库有在onload的时候调用
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
所以静态库也要显示调用
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
否则,各种问题都有。。。。。
主要
/*
* Initialize Keys
*/
if ((pthread_key_create (&ptw32_selfThreadKey, NULL) != 0) ||
(pthread_key_create (&ptw32_cleanupKey, NULL) != 0))
{
ptw32_processTerminate ();
}