Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
posix_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_POSIX_SCHED_H_
7#define ZEPHYR_INCLUDE_POSIX_POSIX_SCHED_H_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/* Cooperative scheduling policy */
14#ifndef SCHED_FIFO
15#define SCHED_FIFO 0
16#endif /* SCHED_FIFO */
17
18/* Priority based preemptive scheduling policy */
19#ifndef SCHED_RR
20#define SCHED_RR 1
21#endif /* SCHED_RR */
22
25};
26
32static inline int sched_yield(void)
33{
34 k_yield();
35 return 0;
36}
37
38int sched_get_priority_min(int policy);
39int sched_get_priority_max(int policy);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif /* ZEPHYR_INCLUDE_POSIX_POSIX_SCHED_H_ */
void k_yield(void)
Yield the current thread.
static int sched_yield(void)
Yield the processor.
Definition: posix_sched.h:32
int sched_get_priority_min(int policy)
int sched_get_priority_max(int policy)
Definition: posix_sched.h:23
int sched_priority
Definition: posix_sched.h:24