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.

process.h 653B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _GPXE_PROCESS_H
  2. #define _GPXE_PROCESS_H
  3. /** @file
  4. *
  5. * Processes
  6. *
  7. */
  8. #include <gpxe/list.h>
  9. /** A process */
  10. struct process {
  11. /** List of processes */
  12. struct list_head list;
  13. /**
  14. * Single-step the process
  15. *
  16. * This method should execute a single step of the process.
  17. * Returning from this method is isomorphic to yielding the
  18. * CPU to another process.
  19. *
  20. * If the process wishes to be executed again, it must re-add
  21. * itself to the run queue using schedule().
  22. */
  23. void ( * step ) ( struct process *process );
  24. };
  25. extern void schedule ( struct process *process );
  26. extern void step ( void );
  27. #endif /* _GPXE_PROCESS_H */