MOS Source Code
Loading...
Searching...
No Matches
schedule.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
6
7void scheduler_init();
8
10
15void unblock_scheduler(void);
16
21[[noreturn]] void enter_scheduler(void);
22
28void scheduler_add_thread(Thread *thread);
29
36
42void scheduler_wake_thread(Thread *thread);
43
48void reschedule(void);
49
54void blocked_reschedule(void);
55
#define __nodiscard
Definition mos_global.h:35
thread_state_t
Definition platform.hpp:43
void scheduler_init()
Definition schedule.cpp:49
void blocked_reschedule(void)
Mark the current task as blocked and reschedule.
Definition schedule.cpp:163
__nodiscard bool reschedule_for_waitlist(waitlist_t *waitlist)
Definition schedule.cpp:171
void unblock_scheduler(void)
Unblock the scheduler, so that APs can start scheduling.
Definition schedule.cpp:59
void enter_scheduler(void)
Enter the scheduler and switch to the next thread.
Definition schedule.cpp:66
void reschedule(void)
reschedule.
Definition schedule.cpp:106
char thread_state_str(thread_state_t state)
Definition schedule.cpp:13
void scheduler_add_thread(Thread *thread)
Add a thread to the scheduler, so that it can be scheduled.
Definition schedule.cpp:77
void scheduler_remove_thread(Thread *thread)
Remove a thread from the scheduler.
Definition schedule.cpp:84
void scheduler_wake_thread(Thread *thread)
Wake a thread.
Definition schedule.cpp:90