Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

list.c 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. FILE_LICENCE ( GPL2_OR_LATER );
  20. /** @file
  21. *
  22. * Linked lists
  23. *
  24. */
  25. #include <ipxe/list.h>
  26. void extern_list_add ( struct list_head *new, struct list_head *head ) {
  27. inline_list_add ( new, head );
  28. }
  29. void extern_list_add_tail ( struct list_head *new, struct list_head *head ) {
  30. inline_list_add_tail ( new, head );
  31. }
  32. void extern_list_del ( struct list_head *list ) {
  33. inline_list_del ( list );
  34. }
  35. int extern_list_empty ( const struct list_head *list ) {
  36. return inline_list_empty ( list );
  37. }
  38. int extern_list_is_singular ( const struct list_head *list ) {
  39. return inline_list_is_singular ( list );
  40. }
  41. int extern_list_is_last ( const struct list_head *list,
  42. const struct list_head *head ) {
  43. return inline_list_is_last ( list, head );
  44. }
  45. void extern_list_cut_position ( struct list_head *new,
  46. struct list_head *list,
  47. struct list_head *entry ) {
  48. inline_list_cut_position ( new, list, entry );
  49. }
  50. void extern_list_splice ( const struct list_head *list,
  51. struct list_head *entry ) {
  52. inline_list_splice ( list, entry );
  53. }
  54. void extern_list_splice_tail ( const struct list_head *list,
  55. struct list_head *entry ) {
  56. inline_list_splice_tail ( list, entry );
  57. }
  58. void extern_list_splice_init ( struct list_head *list,
  59. struct list_head *entry ) {
  60. inline_list_splice_init ( list, entry );
  61. }
  62. void extern_list_splice_tail_init ( struct list_head *list,
  63. struct list_head *entry ) {
  64. inline_list_splice_tail_init ( list, entry );
  65. }
  66. int extern_list_contains ( struct list_head *entry,
  67. struct list_head *head ) {
  68. return inline_list_contains ( entry, head );
  69. }