about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sched/sched_get_priority_max.c11
-rw-r--r--src/sched/sched_getparam.c7
-rw-r--r--src/sched/sched_getscheduler.c7
-rw-r--r--src/sched/sched_rr_get_interval.c8
-rw-r--r--src/sched/sched_setparam.c8
-rw-r--r--src/sched/sched_setscheduler.c8
-rw-r--r--src/sched/sched_yield.c (renamed from src/misc/sched_yield.c)0
7 files changed, 49 insertions, 0 deletions
diff --git a/src/sched/sched_get_priority_max.c b/src/sched/sched_get_priority_max.c
new file mode 100644
index 00000000..64cbca93
--- /dev/null
+++ b/src/sched/sched_get_priority_max.c
@@ -0,0 +1,11 @@
+#include <sched.h>
+
+int sched_get_priority_max(int policy)
+{
+	return 0;
+}
+
+int sched_get_priority_min(int policy)
+{
+	return 0;
+}
diff --git a/src/sched/sched_getparam.c b/src/sched/sched_getparam.c
new file mode 100644
index 00000000..65be1075
--- /dev/null
+++ b/src/sched/sched_getparam.c
@@ -0,0 +1,7 @@
+#include <sched.h>
+#include "syscall.h"
+
+int sched_getparam(pid_t pid, struct sched_param *param)
+{
+	return syscall(SYS_sched_getparam, pid, param);
+}
diff --git a/src/sched/sched_getscheduler.c b/src/sched/sched_getscheduler.c
new file mode 100644
index 00000000..4c922f69
--- /dev/null
+++ b/src/sched/sched_getscheduler.c
@@ -0,0 +1,7 @@
+#include <sched.h>
+#include "syscall.h"
+
+int sched_getscheduler(pid_t pid)
+{
+	return syscall(SYS_sched_getscheduler, pid);
+}
diff --git a/src/sched/sched_rr_get_interval.c b/src/sched/sched_rr_get_interval.c
new file mode 100644
index 00000000..43bc4904
--- /dev/null
+++ b/src/sched/sched_rr_get_interval.c
@@ -0,0 +1,8 @@
+#include <sched.h>
+#include "syscall.h"
+
+int sched_rr_get_interval(pid_t pid, struct timespec *ts)
+{
+	return syscall(SYS_sched_rr_get_interval, pid, ts);
+}
+
diff --git a/src/sched/sched_setparam.c b/src/sched/sched_setparam.c
new file mode 100644
index 00000000..07d61aea
--- /dev/null
+++ b/src/sched/sched_setparam.c
@@ -0,0 +1,8 @@
+#include <sched.h>
+#include "syscall.h"
+
+int sched_setparam(pid_t pid, const struct sched_param *param)
+{
+	static const struct sched_param def;
+	return syscall(SYS_sched_setparam, pid, &def);
+}
diff --git a/src/sched/sched_setscheduler.c b/src/sched/sched_setscheduler.c
new file mode 100644
index 00000000..acf5dc25
--- /dev/null
+++ b/src/sched/sched_setscheduler.c
@@ -0,0 +1,8 @@
+#include <sched.h>
+#include "syscall.h"
+
+int sched_setscheduler(pid_t pid, int sched, const struct sched_param *param)
+{
+	static const struct sched_param def;
+	return syscall(SYS_sched_setscheduler, pid, sched, &def);
+}
diff --git a/src/misc/sched_yield.c b/src/sched/sched_yield.c
index 6c0742b4..6c0742b4 100644
--- a/src/misc/sched_yield.c
+++ b/src/sched/sched_yield.c