5#include <arch/corelocal.h>
76int os_thread_create(entrypoint_t * entrypoint,
void * data, uint8_t priority);
long os_sched_timing_callback(long delay_us)
Kernel callback for timing provider.
Definition sched.c:165
uint8_t Thread_t
Data type used for thread IDs.
Definition defines.h:72
#define OS_NUM_CORES
Definition kernel.h:45
uint8_t os_get_current_thread(void)
Kernel implementation of get_tid() syscall.
Definition sched.c:189
int os_thread_stop(uint8_t thread)
Kernel implementation of thread_stop() syscall.
Definition sched.c:317
int os_thread_set_ready(struct OS_thread_t *thread)
Definition sched.c:360
struct OS_core_state_t core[OS_NUM_CORES]
CPU scheduling thread IDs.
Definition sched.c:41
uint32_t os_shutdown(void)
Kernel implementation of the shutdown() syscall.
Definition sched.c:628
struct OS_thread_t * os_thread_get(Thread_t thread_id)
Get thread descriptor.
Definition sched.c:643
uint8_t os_get_current_process(void)
Kernel implementation of get_pid.
Definition sched.c:204
void os_thread_dispose(void)
Alias to thread_exit.
int os_thread_kill(uint8_t thread_id, int status)
Kernel way to kill an arbitrary thread.
Definition sched.c:288
struct OS_thread_t * os_thread_by_id(Thread_t id)
Definition sched.c:350
int os_thread_join(uint8_t thread_id)
Kernel implementation of thread_join() syscall.
Definition sched.c:419
int os_thread_continue(uint8_t thread)
Kernel implementation of thread_continue() syscall.
Definition sched.c:366
uint32_t os_get_micro_time(void)
Get amount of microseconds elapsed since scheduler start.
Definition sched.c:209
int os_setpriority(uint8_t priority)
Kernel implementation of setpriority() syscall.
Definition sched.c:392
void os_set_current_thread(Thread_t new_thread)
Kernel internal function to override current thread.
Definition sched.c:194
int os_sched_yield(void)
Kernel implementation of sched_yield() syscall.
Definition sched.c:117
int os_thread_migrate(uint8_t thread_id, int target_core)
Migrate thread between CPU cores.
Definition sched.c:648
int os_thread_construct(Thread_t tid, entrypoint_t *entrypoint, void *data, uint8_t core_id)
Make thread runnable.
Definition sched.c:463
uint8_t os_get_current_stack(void)
Get ID of stack used by current thread.
Definition sched.c:199
int os_thread_create(entrypoint_t *entrypoint, void *data, uint8_t priority)
Syscall handling thread_create() Creates new thread inside current process using specified entrypoint...
Definition sched.c:537
uint32_t * os_stack_get(int stack_id)
Get address of stack.
Definition sched.c:264
int os_thread_exit(int status)
Kernel implementation of thread_exit() syscall.
Definition sched.c:282
static void delay_us(uint32_t period_us)
Perform short busy wait.
Definition timer.c:225
void _os_start(uint8_t start_core)
Start up scheduler.
Definition sched.c:546
Structure holding current scheduling state of CPU.
Definition runtime.h:183
Thread control block.
Definition runtime.h:72