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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [sysdeps/] [signal.c] - Blame information for rev 1775

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

Line No. Rev Author Line
1 199 simons
#include <signal.h>
2
 
3
__sighandler_t
4
__signal (int sig, __sighandler_t handler, int flags)
5
{
6
  int ret;
7
  struct sigaction action, oaction;
8
  memset(&action, 0, sizeof(struct sigaction));
9
  action.sa_handler = handler;
10
  action.sa_flags = flags;
11
  ret = sigaction (sig, &action, &oaction);
12
  return (ret == -1) ? SIG_ERR : oaction.sa_handler;
13
}
14
 
15
__sighandler_t
16
signal (int sig, __sighandler_t handler)
17
{
18
  return __signal(sig, handler, (SA_ONESHOT | SA_NOMASK | SA_INTERRUPT) & ~SA_RESTART);
19
}

powered by: WebSVN 2.1.0

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