Linux 多线程函数解析
分类: LulzLinux Linux/program/thread2012-03-04
22:03 670人阅读 评论(0) 收藏 举报
Linux多线程函数解析
Linux多线程函数用得比较多的是下面的3个pthread_create(),pthread_exit(),pthread_join(); 它们都是在头文件之中。编译时需要加静态库-lpthread
下面是函数的说明:pthread_create是UNIX环境创建线程函数
int pthread_create(pthread_t *restrict tidp,const pthread_attr_t *restrict_attr,void*(*start_rtn)(void*),void *restrict arg);
返回值
若成功则返回0,否则返回出错编......
阅读全文