* sim/cris: New directory with C and assembly tests for the CRIS
[deliverable/binutils-gdb.git] / sim / testsuite / sim / cris / c / thread2.c
1 /* Compiler options:
2 #cc: additional_flags=-pthread
3 #notarget: cris*-*-elf
4
5 A sanity check for syscalls resulting from
6 pthread_getschedparam and pthread_setschedparam. */
7
8 #include <pthread.h>
9 #include <stdio.h>
10 #include <stdlib.h>
11
12 int main (void)
13 {
14 struct sched_param param;
15 int policy;
16
17 if (pthread_getschedparam (pthread_self (), &policy, &param) != 0
18 || policy != SCHED_OTHER
19 || param.sched_priority != 0)
20 abort ();
21
22 if (pthread_setschedparam (pthread_self (), SCHED_OTHER, &param) != 0
23 || param.sched_priority != 0)
24 abort ();
25
26 printf ("pass\n");
27 exit (0);
28 }
This page took 0.032428 seconds and 4 git commands to generate.