Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / core / list.c
1 /*
2  * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301, USA.
18  */
19
20 FILE_LICENCE ( GPL2_OR_LATER );
21
22 /** @file
23  *
24  * Linked lists
25  *
26  */
27
28 #include <ipxe/list.h>
29
30 void extern_list_add ( struct list_head *new, struct list_head *head ) {
31         inline_list_add ( new, head );
32 }
33
34 void extern_list_add_tail ( struct list_head *new, struct list_head *head ) {
35         inline_list_add_tail ( new, head );
36 }
37
38 void extern_list_del ( struct list_head *list ) {
39         inline_list_del ( list );
40 }
41
42 int extern_list_empty ( const struct list_head *list ) {
43         return inline_list_empty ( list );
44 }
45
46 int extern_list_is_singular ( const struct list_head *list ) {
47         return inline_list_is_singular ( list );
48 }
49
50 int extern_list_is_last ( const struct list_head *list,
51                           const struct list_head *head ) {
52         return inline_list_is_last ( list, head );
53 }
54
55 void extern_list_cut_position ( struct list_head *new,
56                                 struct list_head *list,
57                                 struct list_head *entry ) {
58         inline_list_cut_position ( new, list, entry );
59 }
60
61 void extern_list_splice ( const struct list_head *list,
62                           struct list_head *entry ) {
63         inline_list_splice ( list, entry );
64 }
65
66 void extern_list_splice_tail ( const struct list_head *list,
67                                struct list_head *entry ) {
68         inline_list_splice_tail ( list, entry );
69 }
70
71 void extern_list_splice_init ( struct list_head *list,
72                                struct list_head *entry ) {
73         inline_list_splice_init ( list, entry );
74 }
75
76 void extern_list_splice_tail_init ( struct list_head *list,
77                                     struct list_head *entry ) {
78         inline_list_splice_tail_init ( list, entry );
79 }
80
81 int extern_list_contains ( struct list_head *entry,
82                            struct list_head *head ) {
83         return inline_list_contains ( entry, head );
84 }