root/arch/sparc/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/sparc/kernel/signal.c
   3  *
   4  *  Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   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         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)
     /* [previous][next][first][last][top][bottom][index][help] */
  43 {
  44   halt();
  45   return 0;
  46 }
  47 
  48 /*
  49  * Set up a signal frame... Make the stack look the way iBCS2 expects
  50  * it to look.
  51  */
  52 void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long eip,
     /* [previous][next][first][last][top][bottom][index][help] */
  53         struct pt_regs * regs, int signr, unsigned long oldmask)
  54 {
  55   halt();
  56 }
  57 
  58 /*
  59  * Note that 'init' is a special process: it doesn't get signals it doesn't
  60  * want to handle. Thus you cannot kill init even with a SIGKILL even by
  61  * mistake.
  62  *
  63  * Note that we go through the signals twice: once to check the signals that
  64  * the kernel can handle, and then we build all the user-level signal handling
  65  * stack-frames in one go after that.
  66  */
  67 asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  68 {
  69   halt();
  70   return 1;
  71 }

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