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. show_regs
  4. start_thread
  5. exit_thread
  6. flush_thread
  7. copy_thread
  8. dump_thread
  9. 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 void show_regs(struct pt_regs * regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  45 {
  46         printk("\nPS: %04lx PC: %016lx\n", regs->ps, regs->pc);
  47 }
  48 
  49 /*
  50  * Do necessary setup to start up a newly executed thread.
  51  */
  52 void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
     /* [previous][next][first][last][top][bottom][index][help] */
  53 {
  54         regs->pc = pc;
  55         wrusp(sp);
  56 }
  57 
  58 /*
  59  * Free current thread data structures etc..
  60  */
  61 void exit_thread(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  62 {
  63         halt();
  64 }
  65 
  66 void flush_thread(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  67 {
  68         halt();
  69 }
  70 
  71 /*
  72  * This needs lots of work still..
  73  */
  74 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] */
  75 {
  76         struct pt_regs * childregs;
  77 
  78         p->tss.usp = rdusp();
  79         childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1;
  80         *childregs = *regs;
  81         p->tss.ksp = (unsigned long) childregs;
  82 /*      p->tss.pc = XXXX; */
  83         halt();
  84         return clone_flags;
  85 }
  86 
  87 /*
  88  * fill in the user structure for a core dump..
  89  */
  90 void dump_thread(struct pt_regs * regs, struct user * dump)
     /* [previous][next][first][last][top][bottom][index][help] */
  91 {
  92 }
  93 
  94 /*
  95  * sys_execve() executes a new program.
  96  */
  97 asmlinkage int sys_execve(struct pt_regs regs)
     /* [previous][next][first][last][top][bottom][index][help] */
  98 {
  99         halt();
 100         return 0;
 101 }

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