mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Brush up some more code
This commit is contained in:
parent
ee6566a152
commit
a2d269dc38
32 changed files with 251 additions and 335 deletions
|
@ -20,7 +20,6 @@
|
|||
#include "libc/calls/struct/sched_param.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/midpoint.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
|
@ -67,7 +66,8 @@ TEST(sched_setscheduler, test) {
|
|||
|
||||
TEST(sched_setscheduler, testMidpoint) {
|
||||
if (!CanTuneRealtimeSchedulers()) return;
|
||||
struct sched_param p = {_midpoint(sched_get_priority_min(SCHED_FIFO),
|
||||
sched_get_priority_max(SCHED_FIFO))};
|
||||
struct sched_param p = {(sched_get_priority_min(SCHED_FIFO) +
|
||||
sched_get_priority_max(SCHED_FIFO)) /
|
||||
2};
|
||||
EXPECT_SYS(0, DEFAULT_POLICY, sched_setscheduler(0, SCHED_FIFO, &p));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue