对Linux下C或C++语言在多线程编程时所用到的pthread库中的相关函数进行了总结。
头文件:#include <pthread.h>
注意:在编译时注意加上-lpthread
参数,以调用静态链接库。因为pthread并非linux系统的默认库。
文章目录
-------------------------线程--------------------------
pthread_create:创建线程
函数原型:
int pthread_create (pthread_t * tidp, const pthread_attr_t * attr, void * (start_rtn)(