Files
KirkOS/user/include/mlibc/tests/posix/getparam.c
T
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00

24 lines
405 B
C

#include <assert.h>
#include <errno.h>
#include <sched.h>
#include <unistd.h>
int main() {
struct sched_param param = {
.sched_priority = 100,
};
int ret = sched_getparam(getpid(), &param);
assert(!ret);
ret = sched_setparam(getpid(), &param);
assert(ret == 0);
param.sched_priority = 0xD00DFEED;
ret = sched_setparam(getpid(), &param);
assert(ret == -1 && errno == EINVAL);
return 0;
}