Zephyr Project API  3.3.0
A Scalable Open Source RTOS
sched.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_SCHED_H_
7#define ZEPHYR_INCLUDE_POSIX_SCHED_H_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/* Cooperative scheduling policy */
14#define SCHED_FIFO 1
15
16/* Priority based preemptive scheduling policy */
17#define SCHED_RR 2
18
19#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
20struct sched_param {
21 int sched_priority;
22};
23#endif
24
30static inline int sched_yield(void)
31{
32 k_yield();
33 return 0;
34}
35
36int sched_get_priority_min(int policy);
37int sched_get_priority_max(int policy);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* ZEPHYR_INCLUDE_POSIX_SCHED_H_ */
void k_yield(void)
Yield the current thread.
static int sched_yield(void)
Yield the processor.
Definition: sched.h:30
int sched_get_priority_min(int policy)
int sched_get_priority_max(int policy)