root/arch/alpha/kernel/signal.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sys_sigsuspend
  2. sys_sigreturn
  3. setup_frame
  4. do_signal

   1 /*
   2  *  linux/arch/alpha/kernel/signal.c
   3  *
   4  *  Copyright (C) 1995  Linus Torvalds
   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  * atomically swap in the new signal mask, and wait for a signal.
  25  */
  26 asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, unsigned long set)
     /* [previous][next][first][last][top][bottom][index][help] */
  27 {
  28         unsigned long mask;
  29         struct pt_regs * regs = (struct pt_regs *) &restart;
  30 
  31         halt();
  32         mask = current->blocked;
  33         current->blocked = set & _BLOCKABLE;
  34         while (1) {
  35                 current->state = TASK_INTERRUPTIBLE;
  36                 schedule();
  37                 if (do_signal(mask,regs))
  38                         return -EINTR;
  39         }
  40 }
  41 
  42 /*
  43  * this should do a signal return with the info on the stack..
  44  */
  45 asmlinkage int sys_sigreturn(unsigned long __unused)
     /* [previous][next][first][last][top][bottom][index][help] */
  46 {
  47         halt();
  48         return 0;
  49 }
  50 
  51 /*
  52  * Set up a signal frame... I don't know what it should look like yet.
  53  */
  54 void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long pc,
     /* [previous][next][first][last][top][bottom][index][help] */
  55         struct pt_regs * regs, int signr, unsigned long oldmask)
  56 {
  57         halt();
  58 }
  59 
  60 /*
  61  * Note that 'init' is a special process: it doesn't get signals it doesn't
  62  * want to handle. Thus you cannot kill init even with a SIGKILL even by
  63  * mistake.
  64  *
  65  * Note that we go through the signals twice: once to check the signals that
  66  * the kernel can handle, and then we build all the user-level signal handling
  67  * stack-frames in one go after that.
  68  *
  69  * Not that any of this is actually implemented yet ;-)
  70  */
  71 asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  72 {
  73         halt();
  74         return 1;
  75 }

/* [previous][next][first][last][top][bottom][index][help] */