iPXE
list.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License as
00006  * published by the Free Software Foundation; either version 2 of the
00007  * License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301, USA.
00018  *
00019  * You can also choose to distribute this program under the terms of
00020  * the Unmodified Binary Distribution Licence (as given in the file
00021  * COPYING.UBDL), provided that you have satisfied its requirements.
00022  */
00023 
00024 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00025 
00026 /** @file
00027  *
00028  * Linked lists
00029  *
00030  */
00031 
00032 #include <ipxe/list.h>
00033 
00034 void extern_list_add ( struct list_head *new, struct list_head *head ) {
00035         inline_list_add ( new, head );
00036 }
00037 
00038 void extern_list_add_tail ( struct list_head *new, struct list_head *head ) {
00039         inline_list_add_tail ( new, head );
00040 }
00041 
00042 void extern_list_del ( struct list_head *list ) {
00043         inline_list_del ( list );
00044 }
00045 
00046 int extern_list_empty ( const struct list_head *list ) {
00047         return inline_list_empty ( list );
00048 }
00049 
00050 int extern_list_is_singular ( const struct list_head *list ) {
00051         return inline_list_is_singular ( list );
00052 }
00053 
00054 int extern_list_is_last ( const struct list_head *list,
00055                           const struct list_head *head ) {
00056         return inline_list_is_last ( list, head );
00057 }
00058 
00059 void extern_list_cut_position ( struct list_head *new,
00060                                 struct list_head *list,
00061                                 struct list_head *entry ) {
00062         inline_list_cut_position ( new, list, entry );
00063 }
00064 
00065 void extern_list_splice ( const struct list_head *list,
00066                           struct list_head *entry ) {
00067         inline_list_splice ( list, entry );
00068 }
00069 
00070 void extern_list_splice_tail ( const struct list_head *list,
00071                                struct list_head *entry ) {
00072         inline_list_splice_tail ( list, entry );
00073 }
00074 
00075 void extern_list_splice_init ( struct list_head *list,
00076                                struct list_head *entry ) {
00077         inline_list_splice_init ( list, entry );
00078 }
00079 
00080 void extern_list_splice_tail_init ( struct list_head *list,
00081                                     struct list_head *entry ) {
00082         inline_list_splice_tail_init ( list, entry );
00083 }
00084 
00085 int extern_list_contains ( struct list_head *entry,
00086                            struct list_head *head ) {
00087         return inline_list_contains ( entry, head );
00088 }