Linux线程主要函数

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lixiaogang_theanswer/article/details/82556278

Linux主要线程函数列表

序号 函数说明 函数名称
1 创建线程 pthread_create
2 等待线程结束 pthread_join
3 分离线程 pthread_detach
4 创建线程键 pthread_key_create
5 删除线程键 pthread_key_delete
6 设置线程数据 pthread_setspecific
7 获取线程数据 pthread_getspecific
8 获取线程标识符 pthread_self
9 比较线程 pthread_equal
10 一次执行 pthread_once
11 出让执行权 sched_yield
12 修改优先级 pthread_setschedparam
13 获取优先级 pthread_getschedparam
14 发送信号 pthread_kill
15 设置线程掩码 pthread_sigmask
16 终止线程 pthread_exit
17 退出线程 pthread_cancel
18 允许/禁止退出线程 pthread_setcancelstate
19 设置退出类型 pthread_setcanceltype
20 创建退出点 pthread_testcancel
21 压入善后处理函数 pthread_cleanup_push
22 弹出善后处理函数 pthread_cleanup_pop

猜你喜欢

转载自blog.csdn.net/lixiaogang_theanswer/article/details/82556278