Commit | Line | Data |
---|---|---|
c02433dd MR |
1 | #ifndef __ASM_CURRENT_H |
2 | #define __ASM_CURRENT_H | |
3 | ||
4 | #include <linux/compiler.h> | |
5 | ||
6 | #include <asm/sysreg.h> | |
7 | ||
8 | #ifndef __ASSEMBLY__ | |
9 | ||
10 | struct task_struct; | |
11 | ||
12 | static __always_inline struct task_struct *get_current(void) | |
13 | { | |
14 | return (struct task_struct *)read_sysreg(sp_el0); | |
15 | } | |
16 | ||
17 | #define current get_current() | |
18 | ||
19 | #endif /* __ASSEMBLY__ */ | |
20 | ||
21 | #endif /* __ASM_CURRENT_H */ | |
22 |