projects
/
libc-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression test for robust mutext in detached thread
[libc-test]
/
src
/
api
/
sched.c
diff --git
a/src/api/sched.c
b/src/api/sched.c
index
365b01f
..
def5b35
100644
(file)
--- a/
src/api/sched.c
+++ b/
src/api/sched.c
@@
-1,4
+1,5
@@
#include <sched.h>
#include <sched.h>
+#include "options.h"
#define T(t) (t*)0;
#define F(t,n) {t *y = &x.n;}
#define C(n) switch(n){case n:;}
#define T(t) (t*)0;
#define F(t,n) {t *y = &x.n;}
#define C(n) switch(n){case n:;}
@@
-8,7
+9,7
@@
T(struct timespec)
{
struct sched_param x;
F(int,sched_priority)
{
struct sched_param x;
F(int,sched_priority)
-#if
def X_SS
+#if
defined(POSIX_SPORADIC_SERVER) || defined(POSIX_THREAD_SPORADIC_SERVER)
F(int,sched_ss_low_priority)
F(struct timespec,sched_ss_repl_period)
F(struct timespec,sched_ss_init_budget)
F(int,sched_ss_low_priority)
F(struct timespec,sched_ss_repl_period)
F(struct timespec,sched_ss_init_budget)
@@
-17,18
+18,18
@@
T(time_t)
C(SCHED_SPORADIC)
#endif
}
C(SCHED_SPORADIC)
#endif
}
-#ifdef
X_PS
+#ifdef
POSIX_PRIORITY_SCHEDULING
T(pid_t)
T(pid_t)
+{int(*p)(pid_t,struct sched_param*) = sched_getparam;}
+{int(*p)(pid_t) = sched_getscheduler;}
+{int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
+{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
+#endif
C(SCHED_FIFO)
C(SCHED_RR)
C(SCHED_OTHER)
C(SCHED_FIFO)
C(SCHED_RR)
C(SCHED_OTHER)
-{int(*p)(pid_t,struct sched_param*) = sched_getparam;}
-{int(*p)(pid_t) = sched_getscheduler;}
{int(*p)(int) = sched_get_priority_max;}
{int(*p)(int) = sched_get_priority_min;}
{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;}
{int(*p)(int) = sched_get_priority_max;}
{int(*p)(int) = sched_get_priority_min;}
{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;}
-{int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
-{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
-#endif
{int(*p)(void) = sched_yield;}
}
{int(*p)(void) = sched_yield;}
}