| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: bufq.9,v 1.18 2009/01/24 05:54:35 yamt Exp $ | | 1 | .\" $NetBSD: bufq.9,v 1.19 2009/01/24 10:39:58 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Juergen Hannken-Illjes. | | 7 | .\" by Juergen Hannken-Illjes. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | | 28 | .\" POSSIBILITY OF SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .Dd January 13, 2009 | | 30 | .Dd January 24, 2009 |
31 | .Dt BUFQ 9 | | 31 | .Dt BUFQ 9 |
32 | .Os | | 32 | .Os |
33 | .Sh NAME | | 33 | .Sh NAME |
34 | .Nm bufq , | | 34 | .Nm bufq , |
35 | .Nm bufq_state , | | 35 | .Nm bufq_state , |
36 | .Nm bufq_alloc , | | 36 | .Nm bufq_alloc , |
37 | .Nm bufq_drain , | | 37 | .Nm bufq_drain , |
38 | .Nm bufq_free , | | 38 | .Nm bufq_free , |
39 | .Nm bufq_getstrategyname , | | 39 | .Nm bufq_getstrategyname , |
40 | .Nm bufq_move , | | 40 | .Nm bufq_move , |
41 | .Nm bufq_put , | | 41 | .Nm bufq_put , |
42 | .Nm bufq_get , | | 42 | .Nm bufq_get , |
43 | .Nm bufq_peek , | | 43 | .Nm bufq_peek , |
| @@ -152,27 +152,27 @@ The next buf will remain the same until | | | @@ -152,27 +152,27 @@ The next buf will remain the same until |
152 | .Fn bufq_put , | | 152 | .Fn bufq_put , |
153 | or | | 153 | or |
154 | .Fn bufq_drain | | 154 | .Fn bufq_drain |
155 | is called. | | 155 | is called. |
156 | Returns | | 156 | Returns |
157 | .Dv NULL | | 157 | .Dv NULL |
158 | if the queue is empty. | | 158 | if the queue is empty. |
159 | .It Fn bufq_cancel "bufq" "bp" | | 159 | .It Fn bufq_cancel "bufq" "bp" |
160 | Cancel the buf | | 160 | Cancel the buf |
161 | .Fa bp | | 161 | .Fa bp |
162 | issued earlier on the queue. | | 162 | issued earlier on the queue. |
163 | Returns | | 163 | Returns |
164 | .Dv NULL | | 164 | .Dv NULL |
165 | if the element can not be found on the queue or | | 165 | if the element can not be found on the queue or |
166 | .Fa bp | | 166 | .Fa bp |
167 | if it has been found and removed. | | 167 | if it has been found and removed. |
168 | This operation can be computationally expensive if there are | | 168 | This operation can be computationally expensive if there are |
169 | a lot of buffers queued. | | 169 | a lot of buffers queued. |
170 | .El | | 170 | .El |
171 | .Sh CODE REFERENCES | | 171 | .Sh CODE REFERENCES |
172 | The actual code implementing the device buffer queues can be found | | 172 | The actual code implementing the device buffer queues can be found |
173 | in the file | | 173 | in the file |
174 | .Pa sys/kern/subr_bufq.c . | | 174 | .Pa sys/kern/subr_bufq.c . |
175 | .Sh HISTORY | | 175 | .Sh HISTORY |
176 | The | | 176 | The |
177 | .Nm | | 177 | .Nm |
178 | subsystem appeared in | | 178 | subsystem appeared in |