aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c/exitg1.c
blob: 0b4c425b3e60634e172f18dbc9cd4175857da9e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Check exit_group(2) trivially.  Newlib doesn't have it and the
   pre-v32 glibc requires updated headers we'd have to check or adjust
   for.
#notarget: cris-*-* *-*-elf
#output: exit_group\n
*/
#include <unistd.h>
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef EXITVAL
#define EXITVAL 0
#endif
int main (int argc, char **argv)
{
  printf ("exit_group\n");
  syscall (SYS_exit_group, EXITVAL);
  printf ("failed\n");
  abort ();
}