sleepqueue.9 (167377) | sleepqueue.9 (167387) |
---|---|
1.\" Copyright (c) 2000-2004 John H. Baldwin <jhb@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 7 unchanged lines hidden (view full) --- 16.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 17.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23.\" | 1.\" Copyright (c) 2000-2004 John H. Baldwin <jhb@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 7 unchanged lines hidden (view full) --- 16.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 17.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23.\" |
24.\" $FreeBSD: head/share/man/man9/sleepqueue.9 167377 2007-03-09 18:06:36Z jhb $ | 24.\" $FreeBSD: head/share/man/man9/sleepqueue.9 167387 2007-03-09 22:41:01Z jhb $ |
25.\" 26.Dd March 10, 2004 27.Dt SLEEPQUEUE 9 28.Os 29.Sh NAME 30.Nm init_sleepqueues , 31.Nm sleepq_abort , 32.Nm sleepq_add , --- 140 unchanged lines hidden (view full) --- 173parameter is a bitmask consisting of the type of sleep queue being slept on 174and zero or more optional flags. 175.Pp 176There are currently three types of sleep queues: 177.Pp 178.Bl -tag -width ".Dv SLEEPQ_CONDVAR" -compact 179.It Dv SLEEPQ_CONDVAR 180A sleep queue used to implement condition variables. | 25.\" 26.Dd March 10, 2004 27.Dt SLEEPQUEUE 9 28.Os 29.Sh NAME 30.Nm init_sleepqueues , 31.Nm sleepq_abort , 32.Nm sleepq_add , --- 140 unchanged lines hidden (view full) --- 173parameter is a bitmask consisting of the type of sleep queue being slept on 174and zero or more optional flags. 175.Pp 176There are currently three types of sleep queues: 177.Pp 178.Bl -tag -width ".Dv SLEEPQ_CONDVAR" -compact 179.It Dv SLEEPQ_CONDVAR 180A sleep queue used to implement condition variables. |
181.It Dv SLEEPQ_MSLEEP | 181.It Dv SLEEPQ_SLEEP |
182A sleep queue used to implement | 182A sleep queue used to implement |
183.Xr msleep 9 , | 183.Xr sleep 9 , |
184.Xr wakeup 9 185and 186.Xr wakeup_one 9 . 187.It Dv SLEEPQ_PAUSE 188A sleep queue used to implement 189.Xr pause 9 . 190.El 191.Pp --- 142 unchanged lines hidden (view full) --- 334then this function will not do anything, 335even if the thread is asleep on a different wait channel. 336This function should only be used if one of the other functions above is not 337sufficient. 338One possible use is waking up a specific thread from a widely shared sleep 339channel. 340.Pp 341The sleep queue interface is currently used to implement the | 184.Xr wakeup 9 185and 186.Xr wakeup_one 9 . 187.It Dv SLEEPQ_PAUSE 188A sleep queue used to implement 189.Xr pause 9 . 190.El 191.Pp --- 142 unchanged lines hidden (view full) --- 334then this function will not do anything, 335even if the thread is asleep on a different wait channel. 336This function should only be used if one of the other functions above is not 337sufficient. 338One possible use is waking up a specific thread from a widely shared sleep 339channel. 340.Pp 341The sleep queue interface is currently used to implement the |
342.Xr msleep 9 | 342.Xr sleep 9 |
343and 344.Xr condvar 9 345interfaces. 346Almost all other code in the kernel should use one of those interfaces rather 347than manipulating sleep queues directly. 348.Sh SEE ALSO 349.Xr condvar 9 , | 343and 344.Xr condvar 9 345interfaces. 346Almost all other code in the kernel should use one of those interfaces rather 347than manipulating sleep queues directly. 348.Sh SEE ALSO 349.Xr condvar 9 , |
350.Xr msleep 9 , | |
351.Xr runqueue 9 , | 350.Xr runqueue 9 , |
352.Xr scheduler 9 | 351.Xr scheduler 9 , 352.Xr sleep 9 |