taskset.h 654 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. // Copyright © 2018-2019 Ariadne Devos
  3. /* shttpd - heterogeneous workers */
  4. #ifndef _sHT_TASKSET_H
  5. #define _sHT_TASKSET_H 1
  6. #include <sHT/scheduling.h>
  7. struct sHT_task;
  8. struct epoll_event;
  9. /** A queue of tasks to do, to which tasks are added if they can do IO
  10. and belong to this set.
  11. This object doesn't do any task allocation by itself.*/
  12. struct sHT_taskset
  13. {
  14. sHT_watch_set watches;
  15. unsigned int capacity;
  16. struct sHT_task_queue queue;
  17. /* TODO: multiple task sets can share a single list
  18. TODO: this is rather something for <sHT/scheduling.h> */
  19. struct epoll_event *epoll_events;
  20. };
  21. #endif