|
PatchworkOS
da8a090
A non-POSIX operating system.
|
Per-CPU scheduler. More...
#include <sched.h>
Public Member Functions | |
| _Atomic (int64_t) totalWeight | |
| The total weight of all threads in the runqueue, not protected by the lock. | |
Data Fields | |
| rbtree_t | runqueue |
| Contains all runnable threads, including the currently running thread, sorted by vdeadline. | |
| vclock_t | vtime |
| The current virtual time of the CPU. | |
| clock_t | lastUpdate |
| The real time when the last vtime update occurred. | |
| lock_t | lock |
| The lock protecting the scheduler. | |
| thread_t *volatile | idleThread |
| The idle thread for this CPU. | |
| thread_t *volatile | runThread |
| The currently running thread on this CPU. | |
Per-CPU scheduler.
Stored in a CPU's sched member.
runThread and idleThread members are declared volatile as they can be accessed in interrupt context as well as non-interrupt context. | sched_t::_Atomic | ( | int64_t | ) |
The total weight of all threads in the runqueue, not protected by the lock.
| rbtree_t sched_t::runqueue |
| vclock_t sched_t::vtime |
| clock_t sched_t::lastUpdate |
| thread_t* volatile sched_t::idleThread |
| thread_t* volatile sched_t::runThread |