This source file includes following definitions.
- sys_sigsuspend
- sys_sigreturn
- setup_frame
- do_signal
1
2
3
4
5
6
7 #include <linux/sched.h>
8 #include <linux/kernel.h>
9 #include <linux/signal.h>
10 #include <linux/errno.h>
11 #include <linux/wait.h>
12 #include <linux/ptrace.h>
13 #include <linux/unistd.h>
14
15 #include <asm/segment.h>
16
17 #define _S(nr) (1<<((nr)-1))
18
19 #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
20
21 asmlinkage int sys_waitpid(pid_t pid,unsigned long * stat_addr, int options);
22
23
24
25
26 asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, unsigned long set)
27 {
28 unsigned long mask;
29 struct pt_regs * regs = (struct pt_regs *) &restart;
30
31 mask = current->blocked;
32 current->blocked = set & _BLOCKABLE;
33
34 while (1) {
35 current->state = TASK_INTERRUPTIBLE;
36 schedule();
37 if (do_signal(mask,regs))
38 return -EINTR;
39 }
40 }
41
42 asmlinkage int sys_sigreturn(unsigned long __unused)
43 {
44 halt();
45 return 0;
46 }
47
48
49
50
51
52 void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long eip,
53 struct pt_regs * regs, int signr, unsigned long oldmask)
54 {
55 halt();
56 }
57
58
59
60
61
62
63
64
65
66
67 asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
68 {
69 halt();
70 return 1;
71 }