logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pthread.h.0p (12442B)


  1. '\" et
  2. .TH pthread.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. pthread.h
  12. \(em threads
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <pthread.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <pthread.h>
  21. header shall define the following symbolic constants:
  22. .P
  23. .nf
  24. PTHREAD_BARRIER_SERIAL_THREAD
  25. PTHREAD_CANCEL_ASYNCHRONOUS
  26. PTHREAD_CANCEL_ENABLE
  27. PTHREAD_CANCEL_DEFERRED
  28. PTHREAD_CANCEL_DISABLE
  29. PTHREAD_CANCELED
  30. PTHREAD_CREATE_DETACHED
  31. PTHREAD_CREATE_JOINABLE
  32. PTHREAD_EXPLICIT_SCHED
  33. PTHREAD_INHERIT_SCHED
  34. PTHREAD_MUTEX_DEFAULT
  35. PTHREAD_MUTEX_ERRORCHECK
  36. PTHREAD_MUTEX_NORMAL
  37. PTHREAD_MUTEX_RECURSIVE
  38. PTHREAD_MUTEX_ROBUST
  39. PTHREAD_MUTEX_STALLED
  40. PTHREAD_ONCE_INIT
  41. PTHREAD_PRIO_INHERIT
  42. PTHREAD_PRIO_NONE
  43. PTHREAD_PRIO_PROTECT
  44. PTHREAD_PROCESS_SHARED
  45. PTHREAD_PROCESS_PRIVATE
  46. PTHREAD_SCOPE_PROCESS
  47. PTHREAD_SCOPE_SYSTEM
  48. .fi
  49. .P
  50. The
  51. .IR <pthread.h>
  52. header shall define the following compile-time constant
  53. expressions valid as initializers for the following types:
  54. .TS
  55. tab(!) center box;
  56. cB | cB
  57. l | lB.
  58. Name!Initializer for Type
  59. _
  60. PTHREAD_COND_INITIALIZER!pthread_cond_t
  61. PTHREAD_MUTEX_INITIALIZER!pthread_mutex_t
  62. PTHREAD_RWLOCK_INITIALIZER!pthread_rwlock_t
  63. .TE
  64. .P
  65. The
  66. .IR <pthread.h>
  67. header shall define the
  68. .BR pthread_attr_t ,
  69. .BR pthread_barrier_t ,
  70. .BR pthread_barrierattr_t ,
  71. .BR pthread_cond_t ,
  72. .BR pthread_condattr_t ,
  73. .BR pthread_key_t ,
  74. .BR pthread_mutex_t ,
  75. .BR pthread_mutexattr_t ,
  76. .BR pthread_once_t ,
  77. .BR pthread_rwlock_t ,
  78. .BR pthread_rwlockattr_t ,
  79. .BR pthread_spinlock_t ,
  80. and
  81. .BR pthread_t
  82. types as described in
  83. .IR <sys/types.h> .
  84. .P
  85. The following shall be declared as functions and may also be defined
  86. as macros. Function prototypes shall be provided.
  87. .sp
  88. .RS 4
  89. .nf
  90. int pthread_atfork(void (*)(void), void (*)(void),
  91. void(*)(void));
  92. int pthread_attr_destroy(pthread_attr_t *);
  93. int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
  94. int pthread_attr_getguardsize(const pthread_attr_t *restrict,
  95. size_t *restrict);
  96. int pthread_attr_getinheritsched(const pthread_attr_t *restrict,
  97. int *restrict);
  98. int pthread_attr_getschedparam(const pthread_attr_t *restrict,
  99. struct sched_param *restrict);
  100. int pthread_attr_getschedpolicy(const pthread_attr_t *restrict,
  101. int *restrict);
  102. int pthread_attr_getscope(const pthread_attr_t *restrict,
  103. int *restrict);
  104. int pthread_attr_getstack(const pthread_attr_t *restrict,
  105. void **restrict, size_t *restrict);
  106. int pthread_attr_getstacksize(const pthread_attr_t *restrict,
  107. size_t *restrict);
  108. int pthread_attr_init(pthread_attr_t *);
  109. int pthread_attr_setdetachstate(pthread_attr_t *, int);
  110. int pthread_attr_setguardsize(pthread_attr_t *, size_t);
  111. int pthread_attr_setinheritsched(pthread_attr_t *, int);
  112. int pthread_attr_setschedparam(pthread_attr_t *restrict,
  113. const struct sched_param *restrict);
  114. int pthread_attr_setschedpolicy(pthread_attr_t *, int);
  115. int pthread_attr_setscope(pthread_attr_t *, int);
  116. int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
  117. int pthread_attr_setstacksize(pthread_attr_t *, size_t);
  118. int pthread_barrier_destroy(pthread_barrier_t *);
  119. int pthread_barrier_init(pthread_barrier_t *restrict,
  120. const pthread_barrierattr_t *restrict, unsigned);
  121. int pthread_barrier_wait(pthread_barrier_t *);
  122. int pthread_barrierattr_destroy(pthread_barrierattr_t *);
  123. int pthread_barrierattr_getpshared(
  124. const pthread_barrierattr_t *restrict, int *restrict);
  125. int pthread_barrierattr_init(pthread_barrierattr_t *);
  126. int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
  127. int pthread_cancel(pthread_t);
  128. int pthread_cond_broadcast(pthread_cond_t *);
  129. int pthread_cond_destroy(pthread_cond_t *);
  130. int pthread_cond_init(pthread_cond_t *restrict,
  131. const pthread_condattr_t *restrict);
  132. int pthread_cond_signal(pthread_cond_t *);
  133. int pthread_cond_timedwait(pthread_cond_t *restrict,
  134. pthread_mutex_t *restrict, const struct timespec *restrict);
  135. int pthread_cond_wait(pthread_cond_t *restrict,
  136. pthread_mutex_t *restrict);
  137. int pthread_condattr_destroy(pthread_condattr_t *);
  138. int pthread_condattr_getclock(const pthread_condattr_t *restrict,
  139. clockid_t *restrict);
  140. int pthread_condattr_getpshared(const pthread_condattr_t *restrict,
  141. int *restrict);
  142. int pthread_condattr_init(pthread_condattr_t *);
  143. int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
  144. int pthread_condattr_setpshared(pthread_condattr_t *, int);
  145. int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
  146. void *(*)(void*), void *restrict);
  147. int pthread_detach(pthread_t);
  148. int pthread_equal(pthread_t, pthread_t);
  149. void pthread_exit(void *);
  150. int pthread_getconcurrency(void);
  151. int pthread_getcpuclockid(pthread_t, clockid_t *);
  152. int pthread_getschedparam(pthread_t, int *restrict,
  153. struct sched_param *restrict);
  154. void *pthread_getspecific(pthread_key_t);
  155. int pthread_join(pthread_t, void **);
  156. int pthread_key_create(pthread_key_t *, void (*)(void*));
  157. int pthread_key_delete(pthread_key_t);
  158. int pthread_mutex_consistent(pthread_mutex_t *);
  159. int pthread_mutex_destroy(pthread_mutex_t *);
  160. int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict,
  161. int *restrict);
  162. int pthread_mutex_init(pthread_mutex_t *restrict,
  163. const pthread_mutexattr_t *restrict);
  164. int pthread_mutex_lock(pthread_mutex_t *);
  165. int pthread_mutex_setprioceiling(pthread_mutex_t *restrict, int,
  166. int *restrict);
  167. int pthread_mutex_timedlock(pthread_mutex_t *restrict,
  168. const struct timespec *restrict);
  169. int pthread_mutex_trylock(pthread_mutex_t *);
  170. int pthread_mutex_unlock(pthread_mutex_t *);
  171. int pthread_mutexattr_destroy(pthread_mutexattr_t *);
  172. int pthread_mutexattr_getprioceiling(
  173. const pthread_mutexattr_t *restrict, int *restrict);
  174. int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict,
  175. int *restrict);
  176. int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict,
  177. int *restrict);
  178. int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict,
  179. int *restrict);
  180. int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict,
  181. int *restrict);
  182. int pthread_mutexattr_init(pthread_mutexattr_t *);
  183. int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
  184. int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
  185. int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
  186. int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int);
  187. int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
  188. int pthread_once(pthread_once_t *, void (*)(void));
  189. int pthread_rwlock_destroy(pthread_rwlock_t *);
  190. int pthread_rwlock_init(pthread_rwlock_t *restrict,
  191. const pthread_rwlockattr_t *restrict);
  192. int pthread_rwlock_rdlock(pthread_rwlock_t *);
  193. int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict,
  194. const struct timespec *restrict);
  195. int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict,
  196. const struct timespec *restrict);
  197. int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
  198. int pthread_rwlock_trywrlock(pthread_rwlock_t *);
  199. int pthread_rwlock_unlock(pthread_rwlock_t *);
  200. int pthread_rwlock_wrlock(pthread_rwlock_t *);
  201. int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
  202. int pthread_rwlockattr_getpshared(
  203. const pthread_rwlockattr_t *restrict, int *restrict);
  204. int pthread_rwlockattr_init(pthread_rwlockattr_t *);
  205. int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
  206. pthread_t
  207. pthread_self(void);
  208. int pthread_setcancelstate(int, int *);
  209. int pthread_setcanceltype(int, int *);
  210. int pthread_setconcurrency(int);
  211. int pthread_setschedparam(pthread_t, int,
  212. const struct sched_param *);
  213. int pthread_setschedprio(pthread_t, int);
  214. int pthread_setspecific(pthread_key_t, const void *);
  215. int pthread_spin_destroy(pthread_spinlock_t *);
  216. int pthread_spin_init(pthread_spinlock_t *, int);
  217. int pthread_spin_lock(pthread_spinlock_t *);
  218. int pthread_spin_trylock(pthread_spinlock_t *);
  219. int pthread_spin_unlock(pthread_spinlock_t *);
  220. void pthread_testcancel(void);
  221. .fi
  222. .P
  223. .RE
  224. .P
  225. The following may be declared as functions, or defined as macros, or both.
  226. If functions are declared, function prototypes shall be provided.
  227. .sp
  228. .RS
  229. \fIpthread_cleanup_pop\fR()
  230. \fIpthread_cleanup_push\fR()
  231. .RE
  232. .P
  233. Inclusion of the
  234. .IR <pthread.h>
  235. header shall make symbols defined in the headers
  236. .IR <sched.h>
  237. and
  238. .IR <time.h>
  239. visible.
  240. .LP
  241. .IR "The following sections are informative."
  242. .SH "APPLICATION USAGE"
  243. None.
  244. .SH RATIONALE
  245. None.
  246. .SH "FUTURE DIRECTIONS"
  247. None.
  248. .SH "SEE ALSO"
  249. .IR "\fB<sched.h>\fP",
  250. .IR "\fB<sys_types.h>\fP",
  251. .IR "\fB<time.h>\fP"
  252. .P
  253. .ad l
  254. The System Interfaces volume of POSIX.1\(hy2017,
  255. .IR "\fIpthread_atfork\fR\^(\|)",
  256. .IR "\fIpthread_attr_destroy\fR\^(\|)",
  257. .IR "\fIpthread_attr_getdetachstate\fR\^(\|)",
  258. .IR "\fIpthread_attr_getguardsize\fR\^(\|)",
  259. .IR "\fIpthread_attr_getinheritsched\fR\^(\|)",
  260. .IR "\fIpthread_attr_getschedparam\fR\^(\|)",
  261. .IR "\fIpthread_attr_getschedpolicy\fR\^(\|)",
  262. .IR "\fIpthread_attr_getscope\fR\^(\|)",
  263. .IR "\fIpthread_attr_getstack\fR\^(\|)",
  264. .IR "\fIpthread_attr_getstacksize\fR\^(\|)",
  265. .IR "\fIpthread_barrier_destroy\fR\^(\|)",
  266. .IR "\fIpthread_barrier_wait\fR\^(\|)",
  267. .IR "\fIpthread_barrierattr_destroy\fR\^(\|)",
  268. .IR "\fIpthread_barrierattr_getpshared\fR\^(\|)",
  269. .IR "\fIpthread_cancel\fR\^(\|)",
  270. .IR "\fIpthread_cleanup_pop\fR\^(\|)",
  271. .IR "\fIpthread_cond_broadcast\fR\^(\|)",
  272. .IR "\fIpthread_cond_destroy\fR\^(\|)",
  273. .IR "\fIpthread_cond_timedwait\fR\^(\|)",
  274. .IR "\fIpthread_condattr_destroy\fR\^(\|)",
  275. .IR "\fIpthread_condattr_getclock\fR\^(\|)",
  276. .IR "\fIpthread_condattr_getpshared\fR\^(\|)",
  277. .IR "\fIpthread_create\fR\^(\|)",
  278. .IR "\fIpthread_detach\fR\^(\|)",
  279. .IR "\fIpthread_equal\fR\^(\|)",
  280. .IR "\fIpthread_exit\fR\^(\|)",
  281. .IR "\fIpthread_getconcurrency\fR\^(\|)",
  282. .IR "\fIpthread_getcpuclockid\fR\^(\|)",
  283. .IR "\fIpthread_getschedparam\fR\^(\|)",
  284. .IR "\fIpthread_getspecific\fR\^(\|)",
  285. .IR "\fIpthread_join\fR\^(\|)",
  286. .IR "\fIpthread_key_create\fR\^(\|)",
  287. .IR "\fIpthread_key_delete\fR\^(\|)",
  288. .IR "\fIpthread_mutex_consistent\fR\^(\|)",
  289. .IR "\fIpthread_mutex_destroy\fR\^(\|)",
  290. .IR "\fIpthread_mutex_getprioceiling\fR\^(\|)",
  291. .IR "\fIpthread_mutex_lock\fR\^(\|)",
  292. .IR "\fIpthread_mutex_timedlock\fR\^(\|)",
  293. .IR "\fIpthread_mutexattr_destroy\fR\^(\|)",
  294. .IR "\fIpthread_mutexattr_getprioceiling\fR\^(\|)",
  295. .IR "\fIpthread_mutexattr_getprotocol\fR\^(\|)",
  296. .IR "\fIpthread_mutexattr_getpshared\fR\^(\|)",
  297. .IR "\fIpthread_mutexattr_getrobust\fR\^(\|)",
  298. .IR "\fIpthread_mutexattr_gettype\fR\^(\|)",
  299. .IR "\fIpthread_once\fR\^(\|)",
  300. .IR "\fIpthread_rwlock_destroy\fR\^(\|)",
  301. .IR "\fIpthread_rwlock_rdlock\fR\^(\|)",
  302. .IR "\fIpthread_rwlock_timedrdlock\fR\^(\|)",
  303. .IR "\fIpthread_rwlock_timedwrlock\fR\^(\|)",
  304. .IR "\fIpthread_rwlock_trywrlock\fR\^(\|)",
  305. .IR "\fIpthread_rwlock_unlock\fR\^(\|)",
  306. .IR "\fIpthread_rwlockattr_destroy\fR\^(\|)",
  307. .IR "\fIpthread_rwlockattr_getpshared\fR\^(\|)",
  308. .IR "\fIpthread_self\fR\^(\|)",
  309. .IR "\fIpthread_setcancelstate\fR\^(\|)",
  310. .IR "\fIpthread_setschedprio\fR\^(\|)",
  311. .IR "\fIpthread_spin_destroy\fR\^(\|)",
  312. .IR "\fIpthread_spin_lock\fR\^(\|)",
  313. .IR "\fIpthread_spin_unlock\fR\^(\|)"
  314. .ad b
  315. .\"
  316. .SH COPYRIGHT
  317. Portions of this text are reprinted and reproduced in electronic form
  318. from IEEE Std 1003.1-2017, Standard for Information Technology
  319. -- Portable Operating System Interface (POSIX), The Open Group Base
  320. Specifications Issue 7, 2018 Edition,
  321. Copyright (C) 2018 by the Institute of
  322. Electrical and Electronics Engineers, Inc and The Open Group.
  323. In the event of any discrepancy between this version and the original IEEE and
  324. The Open Group Standard, the original IEEE and The Open Group Standard
  325. is the referee document. The original Standard can be obtained online at
  326. http://www.opengroup.org/unix/online.html .
  327. .PP
  328. Any typographical or formatting errors that appear
  329. in this page are most likely
  330. to have been introduced during the conversion of the source files to
  331. man page format. To report such errors, see
  332. https://www.kernel.org/doc/man-pages/reporting_bugs.html .