user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#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(), ¶m);
|
||||
assert(!ret);
|
||||
|
||||
ret = sched_setparam(getpid(), ¶m);
|
||||
assert(ret == 0);
|
||||
|
||||
param.sched_priority = 0xD00DFEED;
|
||||
|
||||
ret = sched_setparam(getpid(), ¶m);
|
||||
assert(ret == -1 && errno == EINVAL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user