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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [sig7.c] - Rev 842

Compare with Previous | Blame | View Log

/* Check unsupported case of sigaction syscall.
#notarget: cris*-*-elf
#xerror:
#output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n
#output: program stopped with signal 4.\n
*/
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <errno.h>
 
int
main (void)
{
  struct sigaction sa;
  int err;
  sa.sa_sigaction = NULL;
  sa.sa_flags = SA_RESTART | SA_SIGINFO;
  sigemptyset (&sa.sa_mask);
 
  err = sigaction (SIGFPE, &sa, NULL);
  if (err == -1 && errno == ENOSYS)
    printf ("ENOSYS\n");
 
  printf ("xyzzy\n");
  exit (0);
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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