blob: f168fd528dac121f51ebeb2c229d488a28628e1d [file] [log] [blame]
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_POSIX_SCHED_H_
#define ZEPHYR_INCLUDE_POSIX_SCHED_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Cooperative scheduling policy */
#define SCHED_FIFO 1
/* Priority based preemptive scheduling policy */
#define SCHED_RR 2
#if defined(CONFIG_MINIMAL_LIBC) || defined(CONFIG_PICOLIBC)
struct sched_param {
int sched_priority;
};
#endif
/**
* @brief Yield the processor
*
* See IEEE 1003.1
*/
static inline int sched_yield(void)
{
k_yield();
return 0;
}
int sched_get_priority_min(int policy);
int sched_get_priority_max(int policy);
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_POSIX_SCHED_H_ */