Linux 和 Windows多线程函数对应表

来源:互联网 发布:淘宝的集分宝有什么用 编辑:程序博客网 时间:2024/06/05 20:51
Linux Pthread API                               Windows SDK 库对应 API线程:创建  pthread_create                              CreateThread退出  pthread_exit                                ThreadExit等待  pthread_join                                WaitForSingleObject互斥锁:    创建  pthread_mutex_init                          CreateMutex销毁  pthread_mutex_destroy                       CloseHandle加锁  pthread_mutex_lock                          WaitForSingleObject解锁  pthread_mutex_unlock                        ReleaseMutex条件:创建  pthread_cond_init                           CreateEvent销毁  pthread_cond_destroy                        CloseHandle触发  pthread_cond_signal                         SetEvent广播  pthread_cond_broadcast                      SetEvent/ResetEvent等待  pthread_cond_wait/pthread_cond_timedwait    SingleObjectAndWait
0 0