diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/current.h | 7 | ||||
-rw-r--r-- | include/asm-i386/pda.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/asm-i386/current.h b/include/asm-i386/current.h index 3cbbecd79016..5252ee0f6d7a 100644 --- a/include/asm-i386/current.h +++ b/include/asm-i386/current.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef _I386_CURRENT_H | 1 | #ifndef _I386_CURRENT_H |
2 | #define _I386_CURRENT_H | 2 | #define _I386_CURRENT_H |
3 | 3 | ||
4 | #include <linux/thread_info.h> | 4 | #include <asm/pda.h> |
5 | #include <linux/compiler.h> | ||
5 | 6 | ||
6 | struct task_struct; | 7 | struct task_struct; |
7 | 8 | ||
8 | static __always_inline struct task_struct * get_current(void) | 9 | static __always_inline struct task_struct *get_current(void) |
9 | { | 10 | { |
10 | return current_thread_info()->task; | 11 | return read_pda(pcurrent); |
11 | } | 12 | } |
12 | 13 | ||
13 | #define current get_current() | 14 | #define current get_current() |
diff --git a/include/asm-i386/pda.h b/include/asm-i386/pda.h index f90fde22566d..08a35c478af2 100644 --- a/include/asm-i386/pda.h +++ b/include/asm-i386/pda.h | |||
@@ -7,12 +7,14 @@ | |||
7 | #define _I386_PDA_H | 7 | #define _I386_PDA_H |
8 | 8 | ||
9 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
10 | #include <linux/types.h> | ||
10 | 11 | ||
11 | struct i386_pda | 12 | struct i386_pda |
12 | { | 13 | { |
13 | struct i386_pda *_pda; /* pointer to self */ | 14 | struct i386_pda *_pda; /* pointer to self */ |
14 | 15 | ||
15 | int cpu_number; | 16 | int cpu_number; |
17 | struct task_struct *pcurrent; /* current process */ | ||
16 | }; | 18 | }; |
17 | 19 | ||
18 | extern struct i386_pda *_cpu_pda[]; | 20 | extern struct i386_pda *_cpu_pda[]; |