posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
sched.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018-2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16#ifndef ZEPHYR_INCLUDE_POSIX_SCHED_H_
17#define ZEPHYR_INCLUDE_POSIX_SCHED_H_
18
19#include <sys/types.h>
20#include <time.h>
21
22#include <zephyr/kernel.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
34#define SCHED_OTHER 0
35
37#define SCHED_FIFO 1
38
40#define SCHED_RR 2
41
42#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC) || defined(CONFIG_ARMCLANG_STD_LIBC) \
43 || defined(CONFIG_ARCMWDT_LIBC)
45struct sched_param {
46 int sched_priority;
47};
48#endif
49
59int sched_yield(void);
60
68int sched_get_priority_min(int policy);
69
77int sched_get_priority_max(int policy);
78
87int sched_getparam(pid_t pid, struct sched_param *param);
88
98
107int sched_setparam(pid_t pid, const struct sched_param *param);
108
118int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param);
119
128int sched_rr_get_interval(pid_t pid, struct timespec *interval);
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* ZEPHYR_INCLUDE_POSIX_SCHED_H_ */
int pid_t
Process ID type.
Definition fcntl.h:192
int sched_yield(void)
Yield the processor to another thread of equal or higher priority.
int sched_setparam(pid_t pid, const struct sched_param *param)
Set scheduling parameters for a process.
int sched_rr_get_interval(pid_t pid, struct timespec *interval)
Get the round-robin time quantum for a process.
int sched_getparam(pid_t pid, struct sched_param *param)
Get 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_getscheduler(pid_t pid)
Get the scheduling policy of a process.
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.
Time value with nanosecond resolution.
Definition aio.h:62
POSIX time-of-day types and functions (<sys/time.h>)
POSIX fundamental types (<sys/types.h>)