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