Expand description
This module provides access to the scheduler.
Modulesยง
- dispch ๐
- rr
- rt
- task
- This module provides the basic task and thread structures for the scheduler.
- thread
Macrosยง
- kill ๐
- We define kill as a macro in order to avoid borrow checker issues.
Structsยง
Constantsยง
- THREAD_
COUNT ๐
Staticsยง
Functionsยง
- disable
- This will disable rescheduling until the next call to enable. Use with caution!
- enable
- init
- Initializes the scheduler. This should be called once during kernel initialization, before any threads are created.
- kick_
thread - Wake a thread by raw
uid. C-FFI so ISR-context callers can use it without going through the syscall path. Errors are swallowed: not-yet-sleeping is normal. - needs_
reschedule - This should be called on each timer tick, and if it returns true, sched_enter should be called to reschedule.
- reschedule
- Triggers a reschedule immediately, when interrupts are enabled. This must be called after enqueueing a thread, or after waking up a thread, or putting the current thread to sleep.
- sched_
enter - This will be called by the architecture-specific code to enter the scheduler. It will land the current thread, pick the next thread to run, and return its context and task.
- thread_
finalizer ๐ - with
- This function provides safe access to the global scheduler. It disables interrupts and locks the scheduler. Use with caution!
Type Aliasesยง
- Global
Scheduler ๐ - TaskMap ๐
- Thread
Map ๐ - Waiter
View ๐