MOS Source Code
Loading...
Searching...
No Matches
schedule.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
6
8
9void tasks_init();
10
11void scheduler_init();
12
14
19void unblock_scheduler(void);
20
25[[noreturn]] void enter_scheduler(void);
26
32void scheduler_add_thread(thread_t *thread);
33
40
47
52void reschedule(void);
53
58void blocked_reschedule(void);
59
61
#define __END_DECLS
Definition mos_global.h:23
#define __nodiscard
Definition mos_global.h:35
#define __BEGIN_DECLS
Definition mos_global.h:22
thread_state_t
Definition platform.h:61
void scheduler_init()
Definition schedule.c:50
void blocked_reschedule(void)
Mark the current task as blocked and reschedule.
Definition schedule.c:165
__nodiscard bool reschedule_for_waitlist(waitlist_t *waitlist)
Definition schedule.c:174
void unblock_scheduler(void)
Unblock the scheduler, so that APs can start scheduling.
Definition schedule.c:60
void enter_scheduler(void)
Enter the scheduler and switch to the next thread.
Definition schedule.c:67
void scheduler_wake_thread(thread_t *thread)
Wake a thread.
Definition schedule.c:91
void reschedule(void)
reschedule.
Definition schedule.c:107
char thread_state_str(thread_state_t state)
Definition schedule.c:14
void scheduler_add_thread(thread_t *thread)
Add a thread to the scheduler, so that it can be scheduled.
Definition schedule.c:78
void scheduler_remove_thread(thread_t *thread)
Remove a thread from the scheduler.
Definition schedule.c:85
__BEGIN_DECLS void tasks_init()
Definition tasks.c:46