提交 61be1cfe 编写于 作者: R Rich Felker

implement stub versions of sched_*

these actually work, but for now they prohibit actually setting
priority levels and report min/max priority as 0.
上级 b959d046
#include <sched.h>
int sched_get_priority_max(int policy)
{
return 0;
}
int sched_get_priority_min(int policy)
{
return 0;
}
#include <sched.h>
#include "syscall.h"
int sched_getparam(pid_t pid, struct sched_param *param)
{
return syscall(SYS_sched_getparam, pid, param);
}
#include <sched.h>
#include "syscall.h"
int sched_getscheduler(pid_t pid)
{
return syscall(SYS_sched_getscheduler, pid);
}
#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);
}
#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);
}
#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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册