diff --git a/lib/libpthread/pthread_spin_destroy.3 b/lib/libpthread/pthread_spin_destroy.3 index a879f5c4e055..75ae96855dc6 100644 --- a/lib/libpthread/pthread_spin_destroy.3 +++ b/lib/libpthread/pthread_spin_destroy.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_spin_destroy.3,v 1.5 2008/05/26 00:31:08 ad Exp $ +.\" $NetBSD: pthread_spin_destroy.3,v 1.6 2008/05/26 08:45:55 wiz Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -58,14 +58,6 @@ The value specified by .Fa lock is invalid. .El -.Sh CAVEATS -Applications using spinlocks are vulnerable to the effects of priority -inversion. -Applications using real-time threads (SCHED_FIFO, SCHED_RR) should not use -these interfaces. -Outside carefully controlled environments, priority inversion with spinlocks -can lead to system deadlock. -Mutexes are preferable in nearly every possible use case. .Sh SEE ALSO .Xr pthread_spin_init 3 , .Xr pthread_spin_lock 3 , @@ -75,3 +67,12 @@ Mutexes are preferable in nearly every possible use case. .Fn pthread_spin_destroy conforms to .St -p1003.1-2001 . +.Sh CAVEATS +Applications using spinlocks are vulnerable to the effects of priority +inversion. +Applications using real-time threads +.Pq Dv SCHED_FIFO , SCHED_RR +should not use these interfaces. +Outside carefully controlled environments, priority inversion with spinlocks +can lead to system deadlock. +Mutexes are preferable in nearly every possible use case. diff --git a/lib/libpthread/pthread_spin_init.3 b/lib/libpthread/pthread_spin_init.3 index d748b61925c1..9956a4a42a27 100644 --- a/lib/libpthread/pthread_spin_init.3 +++ b/lib/libpthread/pthread_spin_init.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_spin_init.3,v 1.7 2008/05/26 00:31:08 ad Exp $ +.\" $NetBSD: pthread_spin_init.3,v 1.8 2008/05/26 08:45:55 wiz Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -75,14 +75,6 @@ parameter was neither nor .Dv PTHREAD_PROCESS_PRIVATE . .El -.Sh CAVEATS -Applications using spinlocks are vulnerable to the effects of priority -inversion. -Applications using real-time threads (SCHED_FIFO, SCHED_RR) should not use -these interfaces. -Outside carefully controlled environments, priority inversion with spinlocks -can lead to system deadlock. -Mutexes are preferable in nearly every possible use case. .Sh SEE ALSO .Xr pthread_spin_destroy 3 , .Xr pthread_spin_lock 3 , @@ -92,3 +84,12 @@ Mutexes are preferable in nearly every possible use case. .Fn pthread_spin_init conforms to .St -p1003.1-2001 . +.Sh CAVEATS +Applications using spinlocks are vulnerable to the effects of priority +inversion. +Applications using real-time threads +.Pq Dv SCHED_FIFO , SCHED_RR +should not use these interfaces. +Outside carefully controlled environments, priority inversion with spinlocks +can lead to system deadlock. +Mutexes are preferable in nearly every possible use case. diff --git a/lib/libpthread/pthread_spin_lock.3 b/lib/libpthread/pthread_spin_lock.3 index c55e5c50830c..10e80ac24139 100644 --- a/lib/libpthread/pthread_spin_lock.3 +++ b/lib/libpthread/pthread_spin_lock.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_spin_lock.3,v 1.7 2008/05/26 00:31:08 ad Exp $ +.\" $NetBSD: pthread_spin_lock.3,v 1.8 2008/05/26 08:45:55 wiz Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,6 @@ The .Fn pthread_spin_trylock function performs the same action, but does not block if the lock cannot be immediately obtained (i.e., the lock is held). -.Pp .Sh RETURN VALUES If successful, the .Fn pthread_spin_lock @@ -61,14 +60,6 @@ and .Fn pthread_spin_trylock functions will return zero. Otherwise an error number will be returned to indicate the error. -.Sh CAVEATS -Applications using spinlocks are vulnerable to the effects of priority -inversion. -Applications using real-time threads (SCHED_FIFO, SCHED_RR) should not use -these interfaces. -Outside carefully controlled environments, priority inversion with spinlocks -can lead to system deadlock. -Mutexes are preferable in nearly every possible use case. .Sh ERRORS The .Fn pthread_spin_trylock @@ -110,3 +101,12 @@ and .Fn pthread_spin_trylock conform to .St -p1003.1-2001 . +.Sh CAVEATS +Applications using spinlocks are vulnerable to the effects of priority +inversion. +Applications using real-time threads +.Pq Dv SCHED_FIFO , SCHED_RR +should not use these interfaces. +Outside carefully controlled environments, priority inversion with spinlocks +can lead to system deadlock. +Mutexes are preferable in nearly every possible use case. diff --git a/lib/libpthread/pthread_spin_unlock.3 b/lib/libpthread/pthread_spin_unlock.3 index d113c337d3b1..eda8a0812385 100644 --- a/lib/libpthread/pthread_spin_unlock.3 +++ b/lib/libpthread/pthread_spin_unlock.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_spin_unlock.3,v 1.7 2008/05/26 00:31:08 ad Exp $ +.\" $NetBSD: pthread_spin_unlock.3,v 1.8 2008/05/26 08:45:55 wiz Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -60,14 +60,6 @@ The value specified by .Fa lock is invalid. .El -.Sh CAVEATS -Applications using spinlocks are vulnerable to the effects of priority -inversion. -Applications using real-time threads (SCHED_FIFO, SCHED_RR) should not use -these interfaces. -Outside carefully controlled environments, priority inversion with spinlocks -can lead to system deadlock. -Mutexes are preferable in nearly every possible use case. .Sh SEE ALSO .Xr pthread_spin_destroy 3 , .Xr pthread_spin_init 3 , @@ -77,3 +69,12 @@ Mutexes are preferable in nearly every possible use case. .Fn pthread_rwlock_unlock conforms to .St -p1003.1-2001 . +.Sh CAVEATS +Applications using spinlocks are vulnerable to the effects of priority +inversion. +Applications using real-time threads +.Pq Dv SCHED_FIFO , SCHED_RR +should not use these interfaces. +Outside carefully controlled environments, priority inversion with spinlocks +can lead to system deadlock. +Mutexes are preferable in nearly every possible use case.