General Purpose library for Freestanding C++ and POSIX systems
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.

27 line
414 B

  1. #pragma once
  2. #include "gp/indexed_array.hpp"
  3. #include "gp/vfs/process_data.hpp"
  4. #include "gp/vfs/runqueue.hpp"
  5. namespace gp{
  6. class system;
  7. struct scheduler {
  8. topic_list::node_ptr previous;
  9. topic_list::node_ptr current;
  10. size_t id;
  11. system& sys;
  12. no_inline_decl(
  13. void yield_to(topic_list::node_ptr target)
  14. );
  15. scheduler(class system&, size_t token);
  16. [[noreturn]] void startup();
  17. void yield();
  18. };
  19. }