#include <sys/types.h>
#include <time.h>
Go to the source code of this file.
◆ sched_get_priority_max()
int sched_get_priority_max |
( |
int |
policy | ) |
|
|
inline |
Return the maximum priority of the thread can be set.
- Parameters
-
policy | The scheduling policy to provide. Currently, the system only supports SCHED_RR. |
- Return values
-
int | The maximum priority of the thread can be set. |
◆ sched_get_priority_min()
int sched_get_priority_min |
( |
int |
policy | ) |
|
|
inline |
Return the minimum priority of the thread can be set.
- Parameters
-
policy | The scheduling policy to provide. Currently, the system only supports SCHED_RR. |
- Return values
-
int | The minimum priority of the thread can be set. |
◆ sched_rr_get_interval()
int sched_rr_get_interval |
( |
pid_t |
pid, |
|
|
struct timespec * |
tp |
|
) |
| |
Write the round-robin time quantum of the scheduler into the timespec structure pointed to by tp.
- Parameters
-
pid | Not used (The whole system shares the same scheduling policy). |
tp | The timespec structure to provide. |
- Return values
-
int | The minimum priority of the thread can be set. |
◆ sched_yield()
To cause the calling thread to relinquish the CPU.
- Return values
-
int | 0 on success and nonzero error number on error. |