klist.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* readconf/include/klist.h
  2. *
  3. * This file is part of readconf.
  4. *
  5. * readconf is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * readconf is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with readconf. If not, see <https://www.gnu.org/licenses/>
  17. */
  18. #ifndef __KLIST_H
  19. #define __KLIST_H
  20. #include <port.h>
  21. struct klist_node {
  22. __uint64_t value;
  23. void *payload;
  24. struct klist_node *next, *prev;
  25. };
  26. struct klist_node *readconf_klist_find_value(struct klist_node *head, __uint32_t value);
  27. void readconf_klist_init(struct klist_node *head);
  28. void readconf_klist_add(struct klist_node *head, struct klist_node *new);
  29. #endif