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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/*
2
#notarget: cris*-*-elf
3
*/
4
 
5
#include <stdio.h>
6
#include <signal.h>
7
#include <stdlib.h>
8
 
9
/* Like sig1.c, but using sigaction.  */
10
 
11
void
12
leave (int n, siginfo_t *info, void *x)
13
{
14
  abort ();
15
}
16
 
17
int
18
main (void)
19
{
20
  struct sigaction sa;
21
  sa.sa_sigaction = leave;
22
  sa.sa_flags = SA_RESTART | SA_SIGINFO;
23
  sigemptyset (&sa.sa_mask);
24
 
25
  /* Check that the sigaction syscall (for signal) is interpreted, though
26
     possibly ignored.  */
27
  if (sigaction (SIGFPE, &sa, NULL) != 0)
28
    abort ();
29
 
30
  printf ("pass\n");
31
  exit (0);
32
}

powered by: WebSVN 2.1.0

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