posix: sched: Implement sched_rr_get_interval

Implement `sched_rr_get_interval()` POSIX APIs
as a part of PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.
Functions is actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
This commit is contained in:
Gaetan Perrot 2024-01-31 22:42:10 +09:00 committed by Carles Cufí
commit a897c1c7d9
2 changed files with 13 additions and 0 deletions

View file

@ -10,6 +10,8 @@
#include "posix_types.h"
#include <time.h>
#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
}

View file

@ -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;
}