This source file includes following definitions.
- current_thread_info
1
2
3
4
5
6
7
8
9
10 #ifndef _ASM_C6X_THREAD_INFO_H
11 #define _ASM_C6X_THREAD_INFO_H
12
13 #ifdef __KERNEL__
14
15 #include <asm/page.h>
16
17 #ifdef CONFIG_4KSTACKS
18 #define THREAD_SIZE 4096
19 #define THREAD_SHIFT 12
20 #define THREAD_SIZE_ORDER 0
21 #else
22 #define THREAD_SIZE 8192
23 #define THREAD_SHIFT 13
24 #define THREAD_SIZE_ORDER 1
25 #endif
26
27 #define THREAD_START_SP (THREAD_SIZE - 8)
28
29 #ifndef __ASSEMBLY__
30
31 typedef struct {
32 unsigned long seg;
33 } mm_segment_t;
34
35
36
37
38 struct thread_info {
39 struct task_struct *task;
40 unsigned long flags;
41 int cpu;
42 int preempt_count;
43 mm_segment_t addr_limit;
44 };
45
46
47
48
49
50
51 #define INIT_THREAD_INFO(tsk) \
52 { \
53 .task = &tsk, \
54 .flags = 0, \
55 .cpu = 0, \
56 .preempt_count = INIT_PREEMPT_COUNT, \
57 .addr_limit = KERNEL_DS, \
58 }
59
60
61 static inline __attribute__((const))
62 struct thread_info *current_thread_info(void)
63 {
64 struct thread_info *ti;
65 asm volatile (" clr .s2 B15,0,%1,%0\n"
66 : "=b" (ti)
67 : "Iu5" (THREAD_SHIFT - 1));
68 return ti;
69 }
70
71 #define get_thread_info(ti) get_task_struct((ti)->task)
72 #define put_thread_info(ti) put_task_struct((ti)->task)
73 #endif
74
75
76
77
78
79
80 #define TIF_SYSCALL_TRACE 0
81 #define TIF_NOTIFY_RESUME 1
82 #define TIF_SIGPENDING 2
83 #define TIF_NEED_RESCHED 3
84 #define TIF_RESTORE_SIGMASK 4
85
86 #define TIF_MEMDIE 17
87
88 #define TIF_WORK_MASK 0x00007FFE
89 #define TIF_ALLWORK_MASK 0x00007FFF
90
91 #endif
92
93 #endif