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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [thread2.c] - Blame information for rev 842

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* 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.