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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [linux/] [signal.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/* libc/sys/linux/signal.c - Signal handling functions */
2
 
3
/* Written 2000 by Werner Almesberger */
4
 
5
 
6
#include <signal.h>
7
#include <unistd.h>
8
#include <sys/types.h>
9
#include <sys/syscall.h>
10
 
11
 
12
#define __NR___sgetmask __NR_sgetmask /* avoid name space pollution */
13
#define __NR___ssetmask __NR_ssetmask /* avoid name space pollution */
14
 
15
_syscall2(int,kill,pid_t,pid,int,sig)
16
_syscall2(__sighandler_t,signal,int,signum,__sighandler_t,handler)
17
_syscall3(int,sigaction,int,signum,const struct sigaction *,act,
18
  struct sigaction *,oldact)
19
_syscall1(int,sigsuspend,const sigset_t *,mask)
20
_syscall1(int,sigpending,sigset_t *,set)
21
_syscall0(int,pause)
22
_syscall1(unsigned int,alarm,unsigned int,seconds)
23
_syscall3(int,sigprocmask,int,how,const sigset_t *,set,sigset_t *,oldset)
24
 
25
static _syscall0(int,__sgetmask)
26
static _syscall1(int,__ssetmask,int,newmask)
27
 
28
 
29
int sigsetmask(int newmask) /* BSD */
30
{
31
    return __ssetmask(newmask);
32
}
33
 
34
 
35
int sigmask(int signum) /* BSD */
36
{
37
    return 1 << signum;
38
}
39
 
40
 
41
int sigblock(int mask) /* BSD */
42
{
43
    return __ssetmask(mask | __sgetmask());
44
}
45
 
46
 
47
int raise(int sig)
48
{
49
    return kill(getpid(),sig);
50
}
51
 
52
 
53
const char *const sys_siglist[] = {
54
#include "siglist.inc"
55
};

powered by: WebSVN 2.1.0

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