From bd5969fc876a10b18613302db7087ef3c40f18e1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:00 -0500 Subject: lib: Add mlibc Signed-off-by: Ian Moffett --- lib/mlibc/options/posix/include/sched.h | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lib/mlibc/options/posix/include/sched.h (limited to 'lib/mlibc/options/posix/include/sched.h') diff --git a/lib/mlibc/options/posix/include/sched.h b/lib/mlibc/options/posix/include/sched.h new file mode 100644 index 0000000..739d91e --- /dev/null +++ b/lib/mlibc/options/posix/include/sched.h @@ -0,0 +1,49 @@ + +#ifndef _SCHED_H +#define _SCHED_H + +#include +#include +#include +#include + +// MISSING: time_t, struct timespec + +// MISSING: POSIX [PS], [SS] and [TSP] options + +#ifdef __cplusplus +extern "C" { +#endif + +#if __MLIBC_LINUX_OPTION +#include +#include +#endif + +#define SCHED_OTHER 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 +#define SCHED_BATCH 3 +#define SCHED_IDLE 5 +#define SCHED_DEADLINE 6 +#define SCHED_RESET_ON_FORK 0x40000000 + +#ifndef __MLIBC_ABI_ONLY + +int sched_yield(void); + +int sched_get_priority_max(int policy); +int sched_get_priority_min(int policy); + +int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param); + +int sched_getparam(pid_t pid, struct sched_param *param); + +#endif /* !__MLIBC_ABI_ONLY */ + +#ifdef __cplusplus +} +#endif + +#endif // _SCHED_H + -- cgit v1.2.3