repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
pre-commit: run flake8 on more Python files
[binutils-gdb.git]
/
sim
/
testsuite
/
cris
/
c
/
sched4.c
blob
7821cf0c1a086d17784cee54dd9d763cf0e7efce
1
/*
2
#progos: linux
3
*/
4
5
#include <sched.h>
6
#include <stdio.h>
7
#include <errno.h>
8
#include <stdlib.h>
9
#include <unistd.h>
10
11
int
main
(
void
)
12
{
13
struct
sched_param sb
;
14
sb
.
sched_priority
=
0
;
15
if
(
sched_setparam
(
getpid
(), &
sb
) !=
0
16
||
sb
.
sched_priority
!=
0
)
17
abort
();
18
sb
.
sched_priority
=
5
;
19
if
(
sched_setparam
(
getpid
(), &
sb
) ==
0
20
||
errno
!=
EINVAL
21
||
sb
.
sched_priority
!=
5
)
22
abort
();
23
printf
(
"pass
\n
"
);
24
exit
(
0
);
25
}