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
Linux 和 Windows多线程函数对应表
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
下一篇:linux 端口占用
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
windows 多线程
下面的代码使用三种方式创建线程#include <Windows.h>
#include i++ 数组 -
java 多线程 对应内核线程实现 java多线程核心编程
第一章 Java多线程技能 实现多线程的方式: 继承Thread类 实现Runnable接口执行start()方法的顺序不代表线程启动的顺序构造函
java 多线程 对应内核线程实现 停止线程 多线程 数据