This source file includes following definitions.
- release_thread
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _ASM_NIOS2_PROCESSOR_H
18 #define _ASM_NIOS2_PROCESSOR_H
19
20 #include <asm/ptrace.h>
21 #include <asm/registers.h>
22 #include <asm/page.h>
23
24 #define NIOS2_FLAG_KTHREAD 0x00000001
25
26 #define NIOS2_OP_NOP 0x1883a
27 #define NIOS2_OP_BREAK 0x3da03a
28
29 #ifdef __KERNEL__
30
31 #define STACK_TOP TASK_SIZE
32 #define STACK_TOP_MAX STACK_TOP
33
34 #endif
35
36
37 #define KUSER_BASE 0x1000
38 #define KUSER_SIZE (PAGE_SIZE)
39 #ifndef __ASSEMBLY__
40
41 # define TASK_SIZE 0x7FFF0000UL
42 # define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
43
44
45 struct thread_struct {
46 struct pt_regs *kregs;
47
48
49 unsigned long ksp;
50 unsigned long kpsr;
51 };
52
53 #define INIT_MMAP \
54 { &init_mm, (0), (0), __pgprot(0x0), VM_READ | VM_WRITE | VM_EXEC }
55
56 # define INIT_THREAD { \
57 .kregs = NULL, \
58 .ksp = 0, \
59 .kpsr = 0, \
60 }
61
62 extern void start_thread(struct pt_regs *regs, unsigned long pc,
63 unsigned long sp);
64
65 struct task_struct;
66
67
68 static inline void release_thread(struct task_struct *dead_task)
69 {
70 }
71
72 extern unsigned long get_wchan(struct task_struct *p);
73
74 #define task_pt_regs(p) \
75 ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
76
77
78 #define KSTK_EIP(tsk) ((tsk)->thread.kregs->ea)
79 #define KSTK_ESP(tsk) ((tsk)->thread.kregs->sp)
80
81 #define cpu_relax() barrier()
82
83 #endif
84
85 #endif