mirror of
https://github.com/fluencelabs/musl
synced 2025-05-09 13:52:22 +00:00
implement stub versions of sched_*
these actually work, but for now they prohibit actually setting priority levels and report min/max priority as 0.
This commit is contained in:
parent
b959d04644
commit
61be1cfec1
11
src/sched/sched_get_priority_max.c
Normal file
11
src/sched/sched_get_priority_max.c
Normal file
@ -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;
|
||||
}
|
7
src/sched/sched_getparam.c
Normal file
7
src/sched/sched_getparam.c
Normal file
@ -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);
|
||||
}
|
7
src/sched/sched_getscheduler.c
Normal file
7
src/sched/sched_getscheduler.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <sched.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int sched_getscheduler(pid_t pid)
|
||||
{
|
||||
return syscall(SYS_sched_getscheduler, pid);
|
||||
}
|
8
src/sched/sched_rr_get_interval.c
Normal file
8
src/sched/sched_rr_get_interval.c
Normal file
@ -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);
|
||||
}
|
||||
|
8
src/sched/sched_setparam.c
Normal file
8
src/sched/sched_setparam.c
Normal file
@ -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);
|
||||
}
|
8
src/sched/sched_setscheduler.c
Normal file
8
src/sched/sched_setscheduler.c
Normal file
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user