diff options
Diffstat (limited to 'include/asm-cris/current.h')
-rw-r--r-- | include/asm-cris/current.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-cris/current.h b/include/asm-cris/current.h new file mode 100644 index 000000000..6b00b86b6 --- /dev/null +++ b/include/asm-cris/current.h @@ -0,0 +1,15 @@ +#ifndef _CRIS_CURRENT_H +#define _CRIS_CURRENT_H + +struct task_struct; + +static inline struct task_struct * get_current(void) +{ + struct task_struct *current; + __asm__("and.d sp,%0; ":"=r" (current) : "0" (~8191UL)); + return current; + } + +#define current get_current() + +#endif /* !(_CRIS_CURRENT_H) */ |