线程相关函数汇总

本文汇总了 Linux 下 pthread 相关函数,包括线程管理、条件变量操作、互斥锁操作等,为开发者提供了全面的 pthread 函数参考。

linux下pthread函数汇总
通过在线帮助查看:
# man -k pthread
通过在线查看具体函数的帮助
# man sigwait 可以获得sigwait的在线帮助.

pthread_atfork (3thr) - register handlers to be called at fork(2) time

pthread_attr_destroy [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_getdetachstate [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_getinheritsched [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_getschedparam [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_getschedpolicy [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_getscope [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_init (3thr) - thread creation attributes

pthread_attr_setdetachstate [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_setinheritsched [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_setschedparam [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_setschedpolicy [pthread_attr_init] (3thr) - thread creation attributes

pthread_attr_setscope [pthread_attr_init] (3thr) - thread creation attributes

pthread_cancel (3thr) - thread cancellation

pthread_cleanup_pop [pthread_cleanup_push] (3thr) - install and remove cleanup

handlers

pthread_cleanup_pop_restore_np [pthread_cleanup_push] (3thr) - install and remove cleanup handlers

pthread_cleanup_push (3thr) - install and remove cleanup handlers

pthread_cleanup_push_defer_np [pthread_cleanup_push] (3thr) - install and remove cleanup handlers

pthread_cond_broadcast [pthread_cond_init] (3thr) - operations on conditions

pthread_cond_destroy [pthread_cond_init] (3thr) - operations on conditions

pthread_cond_init (3thr) - operations on conditions

pthread_cond_signal [pthread_cond_init] (3thr) - operations on conditions

pthread_cond_timedwait [pthread_cond_init] (3thr) - operations on conditions

pthread_cond_wait [pthread_cond_init] (3thr) - operations on conditions

pthread_condattr_destroy [pthread_condattr_init] (3thr) - condition creation attributes

pthread_condattr_init (3thr) - condition creation attributes

pthread_create (3thr) - create a new thread

pthread_detach (3thr) - put a running thread in the detached state

pthread_equal (3thr) - compare two thread identifiers

pthread_exit (3thr) - terminate the calling thread

pthread_getschedparam [pthread_setschedparam] (3thr) - control thread scheduling parameters

pthread_getspecific [pthread_key_create] (3thr) - management of thread-specific data

pthread_join (3thr) - wait for termination of another thread

pthread_key_create (3thr) - management of thread-specific data

pthread_key_delete [pthread_key_create] (3thr) - management of thread-specific

data

pthread_kill [pthread_sigmask] (3thr) - handling of signals in threads

pthread_kill_other_threads_np (3thr) - terminate all threads in program except

calling thread

pthread_mutex_destroy [pthread_mutex_init] (3thr) - operations on mutexes

pthread_mutex_init (3thr) - operations on mutexes

pthread_mutex_lock [pthread_mutex_init] (3thr) - operations on mutexes

pthread_mutex_trylock [pthread_mutex_init] (3thr) - operations on mutexes

pthread_mutex_unlock [pthread_mutex_init] (3thr) - operations on mutexes

pthread_mutexattr_destroy [pthread_mutexattr_init] (3thr) - mutex creation attributes

pthread_mutexattr_getkind_np [pthread_mutexattr_setkind_np] (3thr) - deprecated mutex creation attributes

pthread_mutexattr_gettype [pthread_mutexattr_init] (3thr) - mutex creation attributes

pthread_mutexattr_init (3thr) - mutex creation attributes

pthread_mutexattr_setkind_np (3thr) - deprecated mutex creation attributes

pthread_mutexattr_settype [pthread_mutexattr_init] (3thr) - mutex creation attributes

pthread_once (3thr) - once-only initialization

pthread_self (3thr) - return identifier of current thread

pthread_setcancelstate [pthread_cancel] (3thr) - thread cancellation

pthread_setcanceltype [pthread_cancel] (3thr) - thread cancellation

pthread_setschedparam (3thr) - control thread scheduling parameters

pthread_setspecific [pthread_key_create] (3thr) - management of thread-specific data

pthread_sigmask (3thr) - handling of signals in threads

pthread_testcancel [pthread_cancel] (3thr) - thread cancellation

sigwait [pthread_sigmask] (3thr) - handling of signals in threads

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值