线程退出函数原型:voidpthread_exit(void *rval_ptr);获取当前线程id函数原型:pthread_t pthread_self(void);互斥锁创建pthread_mutex_init;销毁pthread_mutex_destroy;加锁pthread_mutex_lock;解锁pthread_mutex_unlock。条件锁创建pthread_cond_init;销毁pthread_cond_destroy;触发pthread_cond_signal;广播pthread_cond_broadcast;等待pthread_cond_wait。