18#include <arch/sysenter.h>
87#ifdef CMRX_VERBOSE_API_NAMES
88#define setpriority CMRX_API(setpriority)
89#define thread_join CMRX_API(thread_join)
90#define thread_exit CMRX_API(thread_exit)
91#define thread_create CMRX_API(thread_create)
92#define sched_yield CMRX_API(sched_yield)
93#define get_tid CMRX_API(get_tid)
__SYSCALL int CMRX_API() get_tid()
Return current thread ID.
Definition thread.c:11
__SYSCALL int CMRX_API() sched_yield()
Give up processor.
Definition thread.c:6
__SYSCALL int CMRX_API() thread_join(int thread)
Wait for other thread to finish.
Definition thread.c:24
__SYSCALL int CMRX_API() thread_exit(int status)
Terminate currently running thread.
Definition thread.c:30
__SYSCALL int CMRX_API() thread_create(int(*entrypoint)(void *), void *data, uint8_t priority)
Create new thread.
Definition thread.c:16
__SYSCALL int CMRX_API() setpriority(uint8_t priority)
Change thread priority.
Definition thread.c:36
#define __SYSCALL
Mark function as syscall entrypoint in userspace.
Definition sysenter.h:14