免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1294 | 回复: 0
打印 上一主题 下一主题

pthread man page [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-05 10:12 |只看该作者 |倒序浏览

转载自
http://www.9say.com/2009/02/pthread-manual/
为方便查找,将pthread的manual整理如下。
索引:

线程创建、退出:


条件锁:





锁:





信号操作:




                                                            PTHREAD_CREATE(3)

NAME
       pthread_create – create a new thread

SYNOPSIS
       #include

       int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), void * arg);

DESCRIPTION
       pthread_create  creates  a  new  thread  of control that executes concurrently with the calling thread. The new
       thread applies the function start_routine passing it arg as first argument. The new  thread  terminates  either
       explicitly, by calling pthread_exit(3), or implicitly, by returning from the start_routine function. The latter
       case is equivalent to calling pthread_exit(3) with the result returned by start_routine as exit code.

       The attr argument specifies thread attributes to be applied to the new thread. See pthread_attr_init(3)  for  a
       complete  list  of  thread attributes. The attr argument can also be NULL, in which case default attributes are
       used: the created thread is joinable (not detached) and has default (non real-time) scheduling policy.

RETURN VALUE
       On success, the identifier of the newly created thread is stored in the location pointed by  the  thread  argu-
       ment, and a 0 is returned. On error, a non-zero error code is returned.

ERRORS
       EAGAIN not enough system resources to create a process for the new thread.

       EAGAIN more than PTHREAD_THREADS_MAX threads are already active.

AUTHOR
       Xavier Leroy

SEE ALSO
       pthread_exit(3), pthread_join(3), pthread_detach(3), pthread_attr_init(3).


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/77943/showart_1986030.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP