Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _I386_CURRENT_H |
| 2 | #define _I386_CURRENT_H |
| 3 | |
Jeremy Fitzhardinge | ec7fcaa | 2006-12-07 02:14:03 +0100 | [diff] [blame] | 4 | #include <asm/pda.h> |
| 5 | #include <linux/compiler.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
| 7 | struct task_struct; |
| 8 | |
Jeremy Fitzhardinge | ec7fcaa | 2006-12-07 02:14:03 +0100 | [diff] [blame] | 9 | static __always_inline struct task_struct *get_current(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | { |
Jeremy Fitzhardinge | ec7fcaa | 2006-12-07 02:14:03 +0100 | [diff] [blame] | 11 | return read_pda(pcurrent); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | #define current get_current() |
| 15 | |
| 16 | #endif /* !(_I386_CURRENT_H) */ |