摘要:
函数声明int pthread_create(pthread_t*restrict tidp,const pthread_attr_t *restrict_attr,void*(*start_rtn)(void*),void *restrict arg);返回值若成功则返回0,否则返回出错编号参数第一个参数为指向线程标识符的指针。第二个参数用来设置线程属性。第三个参数是线程运行函数的起始地址。最后一个参数是运行函数的参数。注意 1.在编译时注意加上-lpthread参数,以调用链接库。因为pthread并非Linux系统的默认库,而是posix线程库,在Linux中将其作为一个库来使用,因此. 阅读全文
posted @ 2013-09-18 10:43
yunsicai
阅读(818)
评论(0)
推荐(0)
浙公网安备 33010602011771号