diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2017-10-19 22:04:44 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2017-10-20 10:20:49 +0200 |
| commit | 34d46b816e7bef1bf871a5837e7c40cc3e967f15 (patch) | |
| tree | 63920355dffbf4535723c171eccfcb540465ba93 /man3/pthread_spin_init.3 | |
| parent | 0e905edca831c8b6412e682037f34938cfcdd9b3 (diff) | |
| download | man-pages-34d46b816e7bef1bf871a5837e7c40cc3e967f15.tar.gz | |
pthread_spin_init.3: Strengthen note about when spin locks should (not) be used
Reported-by: Zack Weinberg <zackw@panix.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/pthread_spin_init.3')
| -rw-r--r-- | man3/pthread_spin_init.3 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/man3/pthread_spin_init.3 b/man3/pthread_spin_init.3 index 379b5fb00f..773c6aa863 100644 --- a/man3/pthread_spin_init.3 +++ b/man3/pthread_spin_init.3 @@ -49,6 +49,13 @@ _POSIX_C_SOURCE >= 200112L .RE .ad .SH DESCRIPTION +.IR "General note" : +Most programs should use mutexes +instead of spin locks. +Spin locks are primarily useful in conjunction with real-time +scheduling policies. +See NOTES. +.PP The .BR pthread_spin_init () function allocates any resources required for the use of @@ -145,6 +152,8 @@ those threads will spin forever consuming CPU time. .SH SEE ALSO .ad l .nh +.BR pthread_mutex_init (3), +.BR pthread_mutex_lock (3), .BR pthread_spin_lock (3), .BR pthread_spin_unlock (3), .BR pthreads (7) |
