URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 33 |
/* Check unsupported case of sigaction syscall.
|
/* Check unsupported case of sigaction syscall.
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
#xerror:
|
#xerror:
|
#output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n
|
#output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n
|
#output: program stopped with signal 4.\n
|
#output: program stopped with signal 4.\n
|
*/
|
*/
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <signal.h>
|
#include <signal.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <errno.h>
|
#include <errno.h>
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
struct sigaction sa;
|
struct sigaction sa;
|
int err;
|
int err;
|
sa.sa_sigaction = NULL;
|
sa.sa_sigaction = NULL;
|
sa.sa_flags = SA_RESTART | SA_SIGINFO;
|
sa.sa_flags = SA_RESTART | SA_SIGINFO;
|
sigemptyset (&sa.sa_mask);
|
sigemptyset (&sa.sa_mask);
|
|
|
err = sigaction (SIGFPE, &sa, NULL);
|
err = sigaction (SIGFPE, &sa, NULL);
|
if (err == -1 && errno == ENOSYS)
|
if (err == -1 && errno == ENOSYS)
|
printf ("ENOSYS\n");
|
printf ("ENOSYS\n");
|
|
|
printf ("xyzzy\n");
|
printf ("xyzzy\n");
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.