1 /* SPDX-License-Identifier: GPL-2.0 */ !! 1 #ifndef _I386_CURRENT_H 2 #ifndef __ASM_GENERIC_CURRENT_H !! 2 #define _I386_CURRENT_H 3 #define __ASM_GENERIC_CURRENT_H << 4 3 5 #ifndef __ASSEMBLY__ !! 4 struct task_struct; 6 #include <linux/thread_info.h> << 7 5 8 #define get_current() (current_thread_info()-> !! 6 static inline struct task_struct * get_current(void) >> 7 { >> 8 struct task_struct *current; >> 9 __asm__("andl %%esp,%0; ":"=r" (current) : "" (~8191UL)); >> 10 return current; >> 11 } >> 12 9 #define current get_current() 13 #define current get_current() 10 #endif << 11 14 12 #endif /* __ASM_GENERIC_CURRENT_H */ !! 15 #endif /* !(_I386_CURRENT_H) */ 13 16
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.