OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [thread2.c] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 jlechner
/* 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.