You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.c 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. * You can also choose to distribute this program under the terms of
  20. * the Unmodified Binary Distribution Licence (as given in the file
  21. * COPYING.UBDL), provided that you have satisfied its requirements.
  22. */
  23. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  24. /** @file
  25. *
  26. * Linked lists
  27. *
  28. */
  29. #include <ipxe/list.h>
  30. void extern_list_add ( struct list_head *new, struct list_head *head ) {
  31. inline_list_add ( new, head );
  32. }
  33. void extern_list_add_tail ( struct list_head *new, struct list_head *head ) {
  34. inline_list_add_tail ( new, head );
  35. }
  36. void extern_list_del ( struct list_head *list ) {
  37. inline_list_del ( list );
  38. }
  39. int extern_list_empty ( const struct list_head *list ) {
  40. return inline_list_empty ( list );
  41. }
  42. int extern_list_is_singular ( const struct list_head *list ) {
  43. return inline_list_is_singular ( list );
  44. }
  45. int extern_list_is_last ( const struct list_head *list,
  46. const struct list_head *head ) {
  47. return inline_list_is_last ( list, head );
  48. }
  49. void extern_list_cut_position ( struct list_head *new,
  50. struct list_head *list,
  51. struct list_head *entry ) {
  52. inline_list_cut_position ( new, list, entry );
  53. }
  54. void extern_list_splice ( const struct list_head *list,
  55. struct list_head *entry ) {
  56. inline_list_splice ( list, entry );
  57. }
  58. void extern_list_splice_tail ( const struct list_head *list,
  59. struct list_head *entry ) {
  60. inline_list_splice_tail ( list, entry );
  61. }
  62. void extern_list_splice_init ( struct list_head *list,
  63. struct list_head *entry ) {
  64. inline_list_splice_init ( list, entry );
  65. }
  66. void extern_list_splice_tail_init ( struct list_head *list,
  67. struct list_head *entry ) {
  68. inline_list_splice_tail_init ( list, entry );
  69. }
  70. int extern_list_contains ( struct list_head *entry,
  71. struct list_head *head ) {
  72. return inline_list_contains ( entry, head );
  73. }