diff --git a/include/zephyr/posix/sched.h b/include/zephyr/posix/sched.h index 03b568fadea..b337cc2c022 100644 --- a/include/zephyr/posix/sched.h +++ b/include/zephyr/posix/sched.h @@ -10,6 +10,8 @@ #include "posix_types.h" +#include + #ifdef __cplusplus extern "C" { #endif @@ -53,6 +55,7 @@ int sched_getscheduler(pid_t pid); int sched_setparam(pid_t pid, const struct sched_param *param); int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param); +int sched_rr_get_interval(pid_t pid, struct timespec *interval); #ifdef __cplusplus } diff --git a/lib/posix/options/sched.c b/lib/posix/options/sched.c index 195c5895752..be174d92cd6 100644 --- a/lib/posix/options/sched.c +++ b/lib/posix/options/sched.c @@ -101,3 +101,13 @@ int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) return -1; } + +int sched_rr_get_interval(pid_t pid, struct timespec *interval) +{ + ARG_UNUSED(pid); + ARG_UNUSED(interval); + + errno = ENOSYS; + + return -1; +}