1 /*
2 * Copyright (c) 2018-2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include "pthread_sched.h"
8
9 #include <zephyr/kernel.h>
10 #include <zephyr/posix/sched.h>
11
12 /**
13 * @brief Get minimum priority value for a given policy
14 *
15 * See IEEE 1003.1
16 */
sched_get_priority_min(int policy)17 int sched_get_priority_min(int policy)
18 {
19 return posix_sched_priority_min(policy);
20 }
21
22 /**
23 * @brief Get maximum priority value for a given policy
24 *
25 * See IEEE 1003.1
26 */
sched_get_priority_max(int policy)27 int sched_get_priority_max(int policy)
28 {
29 return posix_sched_priority_max(policy);
30 }
31
32 /**
33 * @brief Get scheduling parameters
34 *
35 * See IEEE 1003.1
36 */
sched_getparam(pid_t pid,struct sched_param * param)37 int sched_getparam(pid_t pid, struct sched_param *param)
38 {
39 ARG_UNUSED(pid);
40 ARG_UNUSED(param);
41
42 errno = ENOSYS;
43
44 return -1;
45 }
46
47 /**
48 * @brief Get scheduling policy
49 *
50 * See IEEE 1003.1
51 */
sched_getscheduler(pid_t pid)52 int sched_getscheduler(pid_t pid)
53 {
54 ARG_UNUSED(pid);
55
56 errno = ENOSYS;
57
58 return -1;
59 }
60
61 /**
62 * @brief Set scheduling parameters
63 *
64 * See IEEE 1003.1
65 */
sched_setparam(pid_t pid,const struct sched_param * param)66 int sched_setparam(pid_t pid, const struct sched_param *param)
67 {
68 ARG_UNUSED(pid);
69 ARG_UNUSED(param);
70
71 errno = ENOSYS;
72
73 return -1;
74 }
75
76 /**
77 * @brief Set scheduling policy
78 *
79 * See IEEE 1003.1
80 */
sched_setscheduler(pid_t pid,int policy,const struct sched_param * param)81 int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param)
82 {
83 ARG_UNUSED(pid);
84 ARG_UNUSED(policy);
85 ARG_UNUSED(param);
86
87 errno = ENOSYS;
88
89 return -1;
90 }
91
sched_rr_get_interval(pid_t pid,struct timespec * interval)92 int sched_rr_get_interval(pid_t pid, struct timespec *interval)
93 {
94 ARG_UNUSED(pid);
95 ARG_UNUSED(interval);
96
97 errno = ENOSYS;
98
99 return -1;
100 }
101