1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
.Dd August 17, 1998
.Dt PTHREADS 3
.Os BSD 4
.Sh NAME
.Nm pthreads
.Nd POSIX 1003.1c thread interface
.Sh SYNOPSIS
.Fd #include <pthread.h>
.Ft int
.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg"
.Ft void
.Fn pthread_cleanup_pop "int execute"
.Ft void
.Fn pthread_cleanup_push "void (*cleanup_routine)(void *)" "void *arg"
.Ft int
.Fn pthread_cond_broadcast "pthread_cond_t *cond"
.Ft int
.Fn pthread_cond_destroy "pthread_cond_t *cond"
.Ft int
.Fn pthread_cond_init "pthread_cond_t *cond" "const pthread_condattr_t *attr"
.Ft int
.Fn pthread_cond_signal "pthread_cond_t *cond"
.Ft int
.Fn pthread_cond_timedwait "pthread_cond_t *cond" "pthread_mutex_t *mutex" "const struct timespec *abstime"
.Ft int
.Fn pthread_cond_wait "pthread_cond_t *cond" "pthread_mutex_t *mutex"
.Ft int
.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg"
.Fn pthread_exit
.Ft int
.Fn pthread_detach "pthread_t thread"
.Ft int
.Fn pthread_equal "pthread_t t1" "pthread_t t2"
.Ft void
.Fn pthread_exit "void *value_ptr"
.Ft void *
.Fn pthread_getspecific "pthread_key_t key"
.Ft int
.Fn pthread_join "pthread_t thread" "void **value_ptr"
.Ft int
.Fn pthread_key_create "pthread_key_t *key" "void (*destructor)(void *)"
.Ft int
.Fn pthread_key_delete "pthread_key_t key"
.Ft int
.Fn pthread_mutex_destroy "pthread_mutex_t *mutex"
.Ft int
.Fn pthread_mutex_init "pthread_mutex_t *mutex" "const pthread_mutexattr_t *attr"
.Ft int
.Fn pthread_mutex_lock "pthread_mutex_t *mutex"
.Ft int
.Fn pthread_mutex_trylock "pthread_mutex_t *mutex"
.Ft int
.Fn pthread_mutex_unlock "pthread_mutex_t *mutex"
.Ft int
.Fn pthread_once "pthread_once_t *once_control" "void (*init_routine)(void)"
.Ft int
.Fn pthread_rwlock_destroy "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlock_init "pthread_rwlock_t *lock" "const pthread_rwlockattr_t *attr"
.Ft int
.Fn pthread_rwlock_rdlock "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlock_tryrdlock "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlock_unlock "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlock_wrlock "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlock_trywrlock "pthread_rwlock_t *lock"
.Ft int
.Fn pthread_rwlockattr_destroy "pthread_rwlockattr_t *attr"
.Ft int
.Fn pthread_rwlockattr_getpshared "pthread_rwlockattr_t *attr" "int *pshared"
.Ft int
.Fn pthread_rwlockattr_init "pthread_rwlockattr_t *attr"
.Ft int
.Fn pthread_rwlockattr_setpshared "pthread_rwlockattr_t *attr" "int *pshared"
.Ft pthread_t
.Fn pthread_self "void"
.Ft int
.Fn pthread_setspecific "pthread_key_t key" "const void *value"
.Sh DESCRIPTION
Steal something from the posix specs to describe what a thread is.
.Sh SEE ALSO
.Xr pthread_cleanup_pop 3 ,
.Xr pthread_cleanup_push 3 ,
.Xr pthread_cond_broadcast 3 ,
.Xr pthread_cond_destroy 3 ,
.Xr pthread_cond_init 3 ,
.Xr pthread_cond_signal 3 ,
.Xr pthread_cond_timedwait 3 ,
.Xr pthread_cond_wait 3 ,
.Xr pthread_create 3 ,
.Xr pthread_detach 3 ,
.Xr pthread_equal 3 ,
.Xr pthread_exit 3 ,
.Xr pthread_getspecific 3 ,
.Xr pthread_join 3 ,
.Xr pthread_key_create 3 ,
.Xr pthread_key_delete 3 ,
.Xr pthread_mutex_destroy 3 ,
.Xr pthread_mutex_init 3 ,
.Xr pthread_mutex_lock 3 ,
.Xr pthread_mutex_trylock 3 ,
.Xr pthread_mutex_unlock 3 ,
.Xr pthread_once 3 ,
.Xr pthread_rwlock_destroy 3 ,
.Xr pthread_rwlock_init 3 ,
.Xr pthread_rwlock_rdlock.3
.Xr pthread_rwlock_unlock 3 ,
.Xr pthread_rwlock_wrlock 3 ,
.Xr pthread_rwlockattr_destroy 3 ,
.Xr pthread_rwlockattr_getpshared 3 ,
.Xr pthread_rwlockattr_init 3 ,
.Xr pthread_rwlockattr_setpshared 3 ,
.Xr pthread_self 3 ,
.Xr pthread_setspecific 3
.Sh STANDARDS
.Fn pthread_create
conforms to ISO/IEC 9945-1 ANSI/IEEE
.Pq Dq Tn POSIX
Std 1003.1 Second Edition 1996-07-12.
|