sleep.9 (217613) | sleep.9 (233648) |
---|---|
1.\" 2.\" Copyright (c) 1996 Joerg Wunsch 3.\" 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 9 unchanged lines hidden (view full) --- 18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" | 1.\" 2.\" Copyright (c) 1996 Joerg Wunsch 3.\" 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 9 unchanged lines hidden (view full) --- 18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: head/share/man/man9/sleep.9 217613 2011-01-19 22:16:42Z jmg $ | 26.\" $FreeBSD: head/share/man/man9/sleep.9 233648 2012-03-29 05:02:12Z eadler $ |
27.\" 28.Dd December 12, 2009 29.Dt SLEEP 9 30.Os 31.Sh NAME 32.Nm msleep , 33.Nm msleep_spin , 34.Nm pause , --- 53 unchanged lines hidden (view full) --- 88The parameter 89.Fa priority 90specifies a new priority for the thread as well as some optional flags. 91If the new priority is not 0, 92then the thread will be made 93runnable with the specified 94.Fa priority 95when it resumes. | 27.\" 28.Dd December 12, 2009 29.Dt SLEEP 9 30.Os 31.Sh NAME 32.Nm msleep , 33.Nm msleep_spin , 34.Nm pause , --- 53 unchanged lines hidden (view full) --- 88The parameter 89.Fa priority 90specifies a new priority for the thread as well as some optional flags. 91If the new priority is not 0, 92then the thread will be made 93runnable with the specified 94.Fa priority 95when it resumes. |
96.Dv PZERO | 96.Dv PZERO |
97should never be used, as it is for compatibility only. 98A new priority of 0 means to use the thread's current priority when 99it is made runnable again. 100.Pp 101If 102.Fa priority 103includes the 104.Dv PCATCH --- 133 unchanged lines hidden (view full) --- 238function requires that only related threads sleep on a specific 239.Fa chan 240address. 241It is the programmer's responsibility to choose a unique 242.Fa chan 243value. 244The older 245.Fn wakeup | 97should never be used, as it is for compatibility only. 98A new priority of 0 means to use the thread's current priority when 99it is made runnable again. 100.Pp 101If 102.Fa priority 103includes the 104.Dv PCATCH --- 133 unchanged lines hidden (view full) --- 238function requires that only related threads sleep on a specific 239.Fa chan 240address. 241It is the programmer's responsibility to choose a unique 242.Fa chan 243value. 244The older 245.Fn wakeup |
246function did not require this, though it was never good practice | 246function did not require this, though it was never good practice |
247for threads to share a 248.Fa chan 249value. 250When converting from 251.Fn wakeup 252to 253.Fn wakeup_one , 254pay particular attention to ensure that no other threads wait on the --- 92 unchanged lines hidden --- | 247for threads to share a 248.Fa chan 249value. 250When converting from 251.Fn wakeup 252to 253.Fn wakeup_one , 254pay particular attention to ensure that no other threads wait on the --- 92 unchanged lines hidden --- |