This source file includes following definitions.
- sys_idle
- hard_reset_now
- start_thread
- exit_thread
- flush_thread
- copy_thread
- dump_thread
- sys_execve
1
2
3
4
5
6
7
8
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)
28 {
29 if (current->pid != 0)
30 return -EPERM;
31
32
33 current->counter = -100;
34 for (;;) {
35 schedule();
36 }
37 }
38
39 void hard_reset_now(void)
40 {
41 halt();
42 }
43
44
45
46
47 void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
48 {
49 regs->pc = pc;
50 wrusp(sp);
51 }
52
53
54
55
56 void exit_thread(void)
57 {
58 halt();
59 }
60
61 void flush_thread(void)
62 {
63 halt();
64 }
65
66
67
68
69 unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
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
78 halt();
79 return clone_flags;
80 }
81
82
83
84
85 void dump_thread(struct pt_regs * regs, struct user * dump)
86 {
87 }
88
89
90
91
92 asmlinkage int sys_execve(struct pt_regs regs)
93 {
94 halt();
95 return 0;
96 }