随笔分类 -  linux

摘要:#includeint pthread_create(pthread_t *restrict tidp,const pthread_attr_t *restrict attr,void *(*start_rtn)(void),void *restrict arg);Returns: 0 if OK, error number on failure第一个参数为指向线程标识符的指针。第二个参数用来设置线程属性。第三个参数是线程运行函数的起始地址。第四个参数是运行函数的参数。当创建线程成功时,函数返回0,若不为0则说明创建线程失败,常见的错误返回代码为EAGAIN和EINVAL。前者表示系统限制创建 阅读全文
posted @ 2012-03-16 13:24 春天的气息 阅读(317) 评论(0) 推荐(0)