osi_generic_list.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _OSI_GENERIC_LIST_
  13. #define _OSI_GENERIC_LIST_
  14. #include <sys/queue.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //! @cond Doxygen_Suppress
  19. typedef SLIST_ENTRY(osiSlistItem) osiSlistIter_t;
  20. typedef SLIST_HEAD(osiSlistHead, osiSlistItem) osiSlistHead_t;
  21. //! @endcond
  22. /**
  23. * @brief data type for generic SLIST item
  24. */
  25. typedef struct osiSlistItem
  26. {
  27. osiSlistIter_t iter; ///< SLIST_ENTRY iterator
  28. } osiSlistItem_t;
  29. //! @cond Doxygen_Suppress
  30. typedef TAILQ_ENTRY(osiTailqItem) osiTailqIter_t;
  31. typedef TAILQ_HEAD(osiTailqHead, osiTailqItem) osiTailqHead_t;
  32. //! @endcond
  33. /**
  34. * @brief data type for generic TAILQ item
  35. */
  36. typedef struct osiTailqItem
  37. {
  38. osiTailqIter_t iter; ///< TAILQ_ENTRY iterator
  39. } osiTailqItem_t;
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif