This source file includes following definitions.
- current_thread_info
1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef _ASM_THREAD_INFO_H
14 #define _ASM_THREAD_INFO_H
15
16 #include <asm/page.h>
17
18 #ifdef CONFIG_16KSTACKS
19 #define THREAD_SIZE_ORDER 1
20 #else
21 #define THREAD_SIZE_ORDER 0
22 #endif
23
24 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
25 #define THREAD_SHIFT (PAGE_SHIFT << THREAD_SIZE_ORDER)
26
27 #ifndef __ASSEMBLY__
28
29 #include <linux/thread_info.h>
30 #include <asm/segment.h>
31
32
33
34
35
36
37
38
39 struct thread_info {
40 unsigned long flags;
41 int preempt_count;
42 struct task_struct *task;
43 mm_segment_t addr_limit;
44 __u32 cpu;
45 unsigned long thr_ptr;
46 };
47
48
49
50
51
52
53 #define INIT_THREAD_INFO(tsk) \
54 { \
55 .task = &tsk, \
56 .flags = 0, \
57 .cpu = 0, \
58 .preempt_count = INIT_PREEMPT_COUNT, \
59 .addr_limit = KERNEL_DS, \
60 }
61
62 static inline __attribute_const__ struct thread_info *current_thread_info(void)
63 {
64 register unsigned long sp asm("sp");
65 return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
66 }
67
68 #endif
69
70
71
72
73
74
75
76
77 #define TIF_RESTORE_SIGMASK 0
78 #define TIF_NOTIFY_RESUME 1
79 #define TIF_SIGPENDING 2
80 #define TIF_NEED_RESCHED 3
81 #define TIF_SYSCALL_AUDIT 4
82 #define TIF_SYSCALL_TRACE 15
83
84
85 #define TIF_MEMDIE 16
86
87 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
88 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
89 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
90 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
91 #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
92 #define _TIF_MEMDIE (1<<TIF_MEMDIE)
93
94
95 #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
96 _TIF_NOTIFY_RESUME)
97
98
99
100
101
102
103
104 #endif