diff options
| author | Alan Cox <alc@FreeBSD.org> | 2001-04-01 06:37:40 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2001-04-01 06:37:40 +0000 |
| commit | 21c8cdfb96ccc1af74b2cdaf4e99467446346bfc (patch) | |
| tree | 918a42caa2b10159e1ee696c7d0eedbf2603532f /sys/compat/linux/linux_misc.c | |
| parent | 3ed49ce8da85e1be3473752b22e2f53d66aa771a (diff) | |
Notes
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 790e679ba36d..ffb280cf9a27 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1175,6 +1175,62 @@ linux_sched_getscheduler(p, uap) return error; } +int +linux_sched_get_priority_max(p, uap) + struct proc *p; + struct linux_sched_get_priority_max_args *uap; +{ + struct sched_get_priority_max_args bsd; + +#ifdef DEBUG + if (ldebug(sched_get_priority_max)) + printf(ARGS(sched_get_priority_max, "%d"), uap->policy); +#endif + + switch (uap->policy) { + case LINUX_SCHED_OTHER: + bsd.policy = SCHED_OTHER; + break; + case LINUX_SCHED_FIFO: + bsd.policy = SCHED_FIFO; + break; + case LINUX_SCHED_RR: + bsd.policy = SCHED_RR; + break; + default: + return EINVAL; + } + return sched_get_priority_max(p, &bsd); +} + +int +linux_sched_get_priority_min(p, uap) + struct proc *p; + struct linux_sched_get_priority_min_args *uap; +{ + struct sched_get_priority_min_args bsd; + +#ifdef DEBUG + if (ldebug(sched_get_priority_min)) + printf(ARGS(sched_get_priority_min, "%d"), uap->policy); +#endif + + switch (uap->policy) { + case LINUX_SCHED_OTHER: + bsd.policy = SCHED_OTHER; + break; + case LINUX_SCHED_FIFO: + bsd.policy = SCHED_FIFO; + break; + case LINUX_SCHED_RR: + bsd.policy = SCHED_RR; + break; + default: + return EINVAL; + } + return sched_get_priority_min(p, &bsd); +} + #define REBOOT_CAD_ON 0x89abcdef #define REBOOT_CAD_OFF 0 #define REBOOT_HALT 0xcdef0123 |
