0
点赞
收藏
分享

微信扫一扫

线程相关函数

pthread_ t pthread_self(); 获取线程id
int pthread_create(pthread_t *tid(传出参数), 线程属性(NULL), 子线程回调函数, 参3的参数(NULL));【成功返回0】创建子线程

void pthread_exit(); 退出当前线程
exit(); 退出当前进程
return; 返回调用者那里

pthread_join();

  1. pthread_mutex_t lock;
  2. pthread_mutex_init;
  3. pthread_mutex_lock;
  4. pthread_mutex_unlock;
  5. pthread_mutex_destroy;
举报

相关推荐

0 条评论