diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
commit | 2f0649f6fe411d7e07c8d56cf8ea56db53536da8 (patch) | |
tree | 778611fb52176dce1ad06c68e87b2cb348ca0f7b /usr/include/sched.h | |
parent | Initial commit. (diff) | |
download | klibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.tar.xz klibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.zip |
Adding upstream version 2.0.13.upstream/2.0.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | usr/include/sched.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/usr/include/sched.h b/usr/include/sched.h new file mode 100644 index 0000000..6874855 --- /dev/null +++ b/usr/include/sched.h @@ -0,0 +1,39 @@ +/* + * sched.h + */ + +#ifndef _SCHED_H +#define _SCHED_H + +#include <klibc/extern.h> +#include <sys/types.h> + +/* linux/sched.h is unusable; put the declarations we need here... */ + +#define SCHED_OTHER 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 + +struct sched_param { + int sched_priority; +}; + +__extern int sched_setscheduler(pid_t, int, const struct sched_param *); +__extern int sched_setaffinity(pid_t, unsigned int, unsigned long *); +__extern int sched_getaffinity(pid_t, unsigned int, unsigned long *); +__extern int sched_yield(void); + +/* Raw interfaces to clone(2); only actually usable for non-VM-cloning */ +#ifdef __ia64__ +__extern pid_t __clone2(int, void *, void *); +static __inline__ pid_t __clone(int _f, void *_sp) +{ + /* If this is used with _sp != 0 it will have the effect of the sp + and rsp growing away from a single point in opposite directions. */ + return __clone2(_f, _sp, _sp); +} +#else +__extern pid_t __clone(int, void *); +#endif + +#endif /* _SCHED_H */ |