The manual
ginnOS
The reference: libc, the libraries and the kernel
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
14{
16};
17
18/**
19 * give the CPU to another thread that is ready to run.
20 * @return 0.
21 */
22int 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 */
29int sched_get_priority_min(int policy);
30int sched_get_priority_max(int policy);
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 o...
int sched_get_priority_max(int policy)
Definition sched.h:14
int sched_priority
Definition sched.h:15