queue.3 (179210) | queue.3 (192926) |
---|---|
1.\" Copyright (c) 1993 2.\" The Regents of the University of California. 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. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)queue.3 8.2 (Berkeley) 1/24/94 | 1.\" Copyright (c) 1993 2.\" The Regents of the University of California. 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. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)queue.3 8.2 (Berkeley) 1/24/94 |
33.\" $FreeBSD: head/share/man/man3/queue.3 179210 2008-05-22 14:40:03Z ed $ | 33.\" $FreeBSD: head/share/man/man3/queue.3 192926 2009-05-27 19:28:04Z ed $ |
34.\" 35.Dd March 24, 2006 36.Dt QUEUE 3 37.Os 38.Sh NAME 39.Nm SLIST_EMPTY , 40.Nm SLIST_ENTRY , 41.Nm SLIST_FIRST , 42.Nm SLIST_FOREACH , 43.Nm SLIST_FOREACH_SAFE , 44.Nm SLIST_HEAD , 45.Nm SLIST_HEAD_INITIALIZER , 46.Nm SLIST_INIT , 47.Nm SLIST_INSERT_AFTER , 48.Nm SLIST_INSERT_HEAD , 49.Nm SLIST_NEXT , | 34.\" 35.Dd March 24, 2006 36.Dt QUEUE 3 37.Os 38.Sh NAME 39.Nm SLIST_EMPTY , 40.Nm SLIST_ENTRY , 41.Nm SLIST_FIRST , 42.Nm SLIST_FOREACH , 43.Nm SLIST_FOREACH_SAFE , 44.Nm SLIST_HEAD , 45.Nm SLIST_HEAD_INITIALIZER , 46.Nm SLIST_INIT , 47.Nm SLIST_INSERT_AFTER , 48.Nm SLIST_INSERT_HEAD , 49.Nm SLIST_NEXT , |
50.Nm SLIST_REMOVE_AFTER , |
|
50.Nm SLIST_REMOVE_HEAD , | 51.Nm SLIST_REMOVE_HEAD , |
51.Nm SLIST_REMOVE_NEXT , | |
52.Nm SLIST_REMOVE , 53.Nm STAILQ_CONCAT , 54.Nm STAILQ_EMPTY , 55.Nm STAILQ_ENTRY , 56.Nm STAILQ_FIRST , 57.Nm STAILQ_FOREACH , 58.Nm STAILQ_FOREACH_SAFE , 59.Nm STAILQ_HEAD , 60.Nm STAILQ_HEAD_INITIALIZER , 61.Nm STAILQ_INIT , 62.Nm STAILQ_INSERT_AFTER , 63.Nm STAILQ_INSERT_HEAD , 64.Nm STAILQ_INSERT_TAIL , 65.Nm STAILQ_LAST , 66.Nm STAILQ_NEXT , | 52.Nm SLIST_REMOVE , 53.Nm STAILQ_CONCAT , 54.Nm STAILQ_EMPTY , 55.Nm STAILQ_ENTRY , 56.Nm STAILQ_FIRST , 57.Nm STAILQ_FOREACH , 58.Nm STAILQ_FOREACH_SAFE , 59.Nm STAILQ_HEAD , 60.Nm STAILQ_HEAD_INITIALIZER , 61.Nm STAILQ_INIT , 62.Nm STAILQ_INSERT_AFTER , 63.Nm STAILQ_INSERT_HEAD , 64.Nm STAILQ_INSERT_TAIL , 65.Nm STAILQ_LAST , 66.Nm STAILQ_NEXT , |
67.Nm STAILQ_REMOVE_AFTER , |
|
67.Nm STAILQ_REMOVE_HEAD , | 68.Nm STAILQ_REMOVE_HEAD , |
68.Nm STAILQ_REMOVE_NEXT , | |
69.Nm STAILQ_REMOVE , 70.Nm LIST_EMPTY , 71.Nm LIST_ENTRY , 72.Nm LIST_FIRST , 73.Nm LIST_FOREACH , 74.Nm LIST_FOREACH_SAFE , 75.Nm LIST_HEAD , 76.Nm LIST_HEAD_INITIALIZER , --- 33 unchanged lines hidden (view full) --- 110.Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" 111.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" 112.Fn SLIST_HEAD "HEADNAME" "TYPE" 113.Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" 114.Fn SLIST_INIT "SLIST_HEAD *head" 115.Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" 116.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" 117.Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" | 69.Nm STAILQ_REMOVE , 70.Nm LIST_EMPTY , 71.Nm LIST_ENTRY , 72.Nm LIST_FIRST , 73.Nm LIST_FOREACH , 74.Nm LIST_FOREACH_SAFE , 75.Nm LIST_HEAD , 76.Nm LIST_HEAD_INITIALIZER , --- 33 unchanged lines hidden (view full) --- 110.Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" 111.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" 112.Fn SLIST_HEAD "HEADNAME" "TYPE" 113.Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" 114.Fn SLIST_INIT "SLIST_HEAD *head" 115.Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" 116.Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" 117.Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" |
118.Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" |
|
118.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" | 119.Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" |
119.Fn SLIST_REMOVE_NEXT "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" | |
120.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" 121.\" 122.Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" 123.Fn STAILQ_EMPTY "STAILQ_HEAD *head" 124.Fn STAILQ_ENTRY "TYPE" 125.Fn STAILQ_FIRST "STAILQ_HEAD *head" 126.Fn STAILQ_FOREACH "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" 127.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" 128.Fn STAILQ_HEAD "HEADNAME" "TYPE" 129.Fn STAILQ_HEAD_INITIALIZER "STAILQ_HEAD head" 130.Fn STAILQ_INIT "STAILQ_HEAD *head" 131.Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" 132.Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" 133.Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" 134.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" 135.Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" | 120.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" 121.\" 122.Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" 123.Fn STAILQ_EMPTY "STAILQ_HEAD *head" 124.Fn STAILQ_ENTRY "TYPE" 125.Fn STAILQ_FIRST "STAILQ_HEAD *head" 126.Fn STAILQ_FOREACH "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" 127.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" 128.Fn STAILQ_HEAD "HEADNAME" "TYPE" 129.Fn STAILQ_HEAD_INITIALIZER "STAILQ_HEAD head" 130.Fn STAILQ_INIT "STAILQ_HEAD *head" 131.Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" 132.Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" 133.Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" 134.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" 135.Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" |
136.Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" |
|
136.Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" | 137.Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" |
137.Fn STAILQ_REMOVE_NEXT "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" | |
138.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" 139.\" 140.Fn LIST_EMPTY "LIST_HEAD *head" 141.Fn LIST_ENTRY "TYPE" 142.Fn LIST_FIRST "LIST_HEAD *head" 143.Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" 144.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" 145.Fn LIST_HEAD "HEADNAME" "TYPE" --- 229 unchanged lines hidden (view full) --- 375after the element 376.Fa listelm . 377.Pp 378The macro 379.Nm SLIST_NEXT 380returns the next element in the list. 381.Pp 382The macro | 138.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" 139.\" 140.Fn LIST_EMPTY "LIST_HEAD *head" 141.Fn LIST_ENTRY "TYPE" 142.Fn LIST_FIRST "LIST_HEAD *head" 143.Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" 144.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" 145.Fn LIST_HEAD "HEADNAME" "TYPE" --- 229 unchanged lines hidden (view full) --- 375after the element 376.Fa listelm . 377.Pp 378The macro 379.Nm SLIST_NEXT 380returns the next element in the list. 381.Pp 382The macro |
383.Nm SLIST_REMOVE_AFTER 384removes the element after 385.Fa elm 386from the list. Unlike 387.Fa SLIST_REMOVE , 388this macro does not traverse the entire list. 389.Pp 390The macro |
|
383.Nm SLIST_REMOVE_HEAD 384removes the element 385.Fa elm 386from the head of the list. 387For optimum efficiency, 388elements being removed from the head of the list should explicitly use 389this macro instead of the generic 390.Fa SLIST_REMOVE 391macro. 392.Pp 393The macro | 391.Nm SLIST_REMOVE_HEAD 392removes the element 393.Fa elm 394from the head of the list. 395For optimum efficiency, 396elements being removed from the head of the list should explicitly use 397this macro instead of the generic 398.Fa SLIST_REMOVE 399macro. 400.Pp 401The macro |
394.Nm SLIST_REMOVE_NEXT 395removes the element after 396.Fa elm 397from the list. Unlike 398.Fa SLIST_REMOVE , 399this macro does not traverse the entire list. 400.Pp 401The macro | |
402.Nm SLIST_REMOVE 403removes the element 404.Fa elm 405from the list. 406.Sh SINGLY-LINKED LIST EXAMPLE 407.Bd -literal 408SLIST_HEAD(slisthead, entry) head = 409 SLIST_HEAD_INITIALIZER(head); --- 149 unchanged lines hidden (view full) --- 559If the tail queue is empty the return value is 560.Dv NULL . 561.Pp 562The macro 563.Nm STAILQ_NEXT 564returns the next item on the tail queue, or NULL this item is the last. 565.Pp 566The macro | 402.Nm SLIST_REMOVE 403removes the element 404.Fa elm 405from the list. 406.Sh SINGLY-LINKED LIST EXAMPLE 407.Bd -literal 408SLIST_HEAD(slisthead, entry) head = 409 SLIST_HEAD_INITIALIZER(head); --- 149 unchanged lines hidden (view full) --- 559If the tail queue is empty the return value is 560.Dv NULL . 561.Pp 562The macro 563.Nm STAILQ_NEXT 564returns the next item on the tail queue, or NULL this item is the last. 565.Pp 566The macro |
567.Nm STAILQ_REMOVE_AFTER 568removes the element after 569.Fa elm 570from the tail queue. Unlike 571.Fa STAILQ_REMOVE , 572this macro does not traverse the entire tail queue. 573.Pp 574The macro |
|
567.Nm STAILQ_REMOVE_HEAD 568removes the element at the head of the tail queue. 569For optimum efficiency, 570elements being removed from the head of the tail queue should 571use this macro explicitly rather than the generic 572.Fa STAILQ_REMOVE 573macro. 574.Pp 575The macro | 575.Nm STAILQ_REMOVE_HEAD 576removes the element at the head of the tail queue. 577For optimum efficiency, 578elements being removed from the head of the tail queue should 579use this macro explicitly rather than the generic 580.Fa STAILQ_REMOVE 581macro. 582.Pp 583The macro |
576.Nm STAILQ_REMOVE_NEXT 577removes the element after 578.Fa elm 579from the tail queue. Unlike 580.Fa STAILQ_REMOVE , 581this macro does not traverse the entire tail queue. 582.Pp 583The macro | |
584.Nm STAILQ_REMOVE 585removes the element 586.Fa elm 587from the tail queue. 588.Sh SINGLY-LINKED TAIL QUEUE EXAMPLE 589.Bd -literal 590STAILQ_HEAD(stailhead, entry) head = 591 STAILQ_HEAD_INITIALIZER(head); --- 414 unchanged lines hidden --- | 584.Nm STAILQ_REMOVE 585removes the element 586.Fa elm 587from the tail queue. 588.Sh SINGLY-LINKED TAIL QUEUE EXAMPLE 589.Bd -literal 590STAILQ_HEAD(stailhead, entry) head = 591 STAILQ_HEAD_INITIALIZER(head); --- 414 unchanged lines hidden --- |