The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
sched.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file sched.h
5
* @brief the scheduler: give up the CPU. ginnOS has one policy for all
6
* processes (the nice value changes the share of each).
7
*/
8
9
#define SCHED_OTHER 0
10
#define SCHED_FIFO 1
// real-time policies: refused (EPERM)
11
#define SCHED_RR 2
12
13
struct
sched_param
14
{
15
int
sched_priority
;
16
};
17
18
/**
19
* give the CPU to another thread that is ready to run.
20
* @return 0.
21
*/
22
int
sched_yield
(
void
);
23
24
/**
25
* the range of priorities of a policy: 0 to 0 for SCHED_OTHER, 1 to 99
26
* for the real-time policies (as on Linux).
27
* @return the priority, or -1 with errno EINVAL for another policy.
28
*/
29
int
sched_get_priority_min
(
int
policy);
30
int
sched_get_priority_max
(
int
policy);
sched_yield
int sched_yield(void)
give the CPU to another thread that is ready to run.
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 o...
sched_get_priority_max
int sched_get_priority_max(int policy)
sched_param
Definition
sched.h:14
sched_param::sched_priority
int sched_priority
Definition
sched.h:15
src
libc
include
sched.h
Generated by
1.18.0