posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
sched.h File Reference

POSIX process and thread scheduling API (<sched.h>) More...

#include <sys/types.h>
#include <time.h>
#include <zephyr/kernel.h>
Include dependency graph for sched.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SCHED_OTHER   0
 Round-robin or other time-sharing scheduling (default).
 
#define SCHED_FIFO   1
 First-in first-out (cooperative) scheduling policy.
 
#define SCHED_RR   2
 Round-robin (preemptive, priority-based) scheduling policy.
 

Functions

int sched_yield (void)
 Yield the processor to another thread of equal or higher priority.
 
int sched_get_priority_min (int policy)
 Get the minimum priority value for a scheduling policy.
 
int sched_get_priority_max (int policy)
 Get the maximum priority value for a scheduling policy.
 
int sched_getparam (pid_t pid, struct sched_param *param)
 Get scheduling parameters for a process.
 
int sched_getscheduler (pid_t pid)
 Get the scheduling policy of a process.
 
int sched_setparam (pid_t pid, const struct sched_param *param)
 Set scheduling parameters for a process.
 
int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param)
 Set the scheduling policy and parameters of a process.
 
int sched_rr_get_interval (pid_t pid, struct timespec *interval)
 Get the round-robin time quantum for a process.
 

Detailed Description

POSIX process and thread scheduling API (<sched.h>)

See also
POSIX.1-2017 <sched.h>

Definition in file sched.h.