首页 > 编程语言 > 详细

windows 与 linux 多线程对应函数

时间:2015-07-27 22:22:57      阅读:313      评论:0      收藏:0      [点我收藏+]
对象操作Linux Pthread APIWindows 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

生产者消费者

http://blog.csdn.net/hudashi/article/details/7709421

 

windows 与 linux 多线程对应函数

原文:http://www.cnblogs.com/doublemystery/p/4681111.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!