The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
sched.h File Reference

the scheduler: give up the CPU. More...

Go to the source code of this file.

Data Structures

struct  sched_param

Macros

#define SCHED_OTHER   0
#define SCHED_FIFO   1
#define SCHED_RR   2

Functions

int sched_yield (void)
 give the CPU to another thread that is ready to run.
int sched_get_priority_min (int policy)
 the range of priorities of a policy: 0 to 0 for SCHED_OTHER, 1 to 99 for the real-time policies (as on Linux).
int sched_get_priority_max (int policy)

Detailed Description

the scheduler: give up the CPU.

ginnOS has one policy for all processes (the nice value changes the share of each).

Macro Definition Documentation

◆ SCHED_OTHER

#define SCHED_OTHER   0

◆ SCHED_FIFO

#define SCHED_FIFO   1

◆ SCHED_RR

#define SCHED_RR   2

Function Documentation

◆ sched_yield()

int sched_yield ( void )

give the CPU to another thread that is ready to run.

Returns
0.

◆ sched_get_priority_min()

int sched_get_priority_min ( int policy)

the range of priorities of a policy: 0 to 0 for SCHED_OTHER, 1 to 99 for the real-time policies (as on Linux).

Returns
the priority, or -1 with errno EINVAL for another policy.

◆ sched_get_priority_max()

int sched_get_priority_max ( int policy)