root/arch/alpha/kernel/process.c

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

DEFINITIONS

This source file includes following definitions.
  1. sys_idle
  2. hard_reset_now
  3. start_thread
  4. exit_thread
  5. flush_thread
  6. copy_thread
  7. dump_thread
  8. sys_execve

   1 /*
   2  *  linux/arch/alpha/kernel/process.c
   3  *
   4  *  Copyright (C) 1995  Linus Torvalds
   5  */
   6 
   7 /*
   8  * This file handles the architecture-dependent parts of process handling..
   9  */
  10 
  11 #include <linux/errno.h>
  12 #include <linux/sched.h>
  13 #include <linux/kernel.h>
  14 #include <linux/mm.h>
  15 #include <linux/stddef.h>
  16 #include <linux/unistd.h>
  17 #include <linux/ptrace.h>
  18 #include <linux/malloc.h>
  19 #include <linux/ldt.h>
  20 #include <linux/user.h>
  21 #include <linux/a.out.h>
  22 
  23 #include <asm/segment.h>
  24 #include <asm/system.h>
  25 #include <asm/io.h>
  26 
  27 asmlinkage int sys_idle(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  28 {
  29         if (current->pid != 0)
  30                 return -EPERM;
  31 
  32         /* endless idle loop with no priority at all */
  33         current->counter = -100;
  34         for (;;) {
  35                 schedule();
  36         }
  37 }
  38 
  39 void hard_reset_now(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  40 {
  41         halt();
  42 }
  43 
  44 /*
  45  * Do necessary setup to start up a newly executed thread.
  46  */
  47 void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
     /* [previous][next][first][last][top][bottom][index][help] */
  48 {
  49         regs->pc = pc;
  50         wrusp(sp);
  51 }
  52 
  53 /*
  54  * Free current thread data structures etc..
  55  */
  56 void exit_thread(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  57 {
  58         halt();
  59 }
  60 
  61 void flush_thread(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  62 {
  63         halt();
  64 }
  65 
  66 /*
  67  * This needs lots of work still..
  68  */
  69 unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  70 {
  71         struct pt_regs * childregs;
  72 
  73         p->tss.usp = rdusp();
  74         childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1;
  75         *childregs = *regs;
  76         p->tss.ksp = (unsigned long) childregs;
  77 /*      p->tss.pc = XXXX; */
  78         halt();
  79         return clone_flags;
  80 }
  81 
  82 /*
  83  * fill in the user structure for a core dump..
  84  */
  85 void dump_thread(struct pt_regs * regs, struct user * dump)
     /* [previous][next][first][last][top][bottom][index][help] */
  86 {
  87 }
  88 
  89 /*
  90  * sys_execve() executes a new program.
  91  */
  92 asmlinkage int sys_execve(struct pt_regs regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  93 {
  94         halt();
  95         return 0;
  96 }

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