Sched
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sched.h.html
Part of QuantumRT Real-Time Kernel.
- Copyright
Copyright (c) 2025 TNX Software Ltd. All rights reserved. Licensed under the terms of the QuantumRT Kernel License. the LICENSE file in the root of this package for details.
Defines
-
SCHED_FIFO (1u << 8)
FIFO scheduling policy.
-
SCHED_RR (1u << 9)
Round-robin scheduling policy.
-
SCHED_SPORADIC (1u << 10)
Sporadic scheduling policy. Not supported.
-
SCHED_OTHER (1u << 11)
Other scheduling policy. Not supported.
Functions
-
int sched_get_priority_max(int policy)
Get maximum priority value for the specified scheduling policy.
- Returns:
Maximum priority value.
-
int sched_get_priority_min(int policy)
Get minimum priority value for the specified scheduling policy.
- Returns:
Minimum priority value.
-
int sched_yield(void)
Yield the processor to another thread that is ready to run.
- Returns:
Always 0.
-
int sched_getparam(pid_t pid, struct sched_param *param)
Not supported.
- Returns:
Always -1 and sets errno to ENOSYS.
-
int sched_rr_get_interval(pid_t pid, struct timespec *interval)
Not supported.
- Returns:
Always -1 and sets errno to ENOSYS.
-
int sched_setparam(pid_t pid, const struct sched_param *param)
Not supported.
- Returns:
Always -1 and sets errno to ENOSYS.
-
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param)
Not supported.
- Returns:
Always -1 and sets errno to ENOSYS.