Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_CURRENT_H
0003 #define _ASM_X86_CURRENT_H
0004 
0005 #include <linux/compiler.h>
0006 #include <asm/percpu.h>
0007 
0008 #ifndef __ASSEMBLY__
0009 struct task_struct;
0010 
0011 DECLARE_PER_CPU(struct task_struct *, current_task);
0012 
0013 static __always_inline struct task_struct *get_current(void)
0014 {
0015     return this_cpu_read_stable(current_task);
0016 }
0017 
0018 #define current get_current()
0019 
0020 #endif /* __ASSEMBLY__ */
0021 
0022 #endif /* _ASM_X86_CURRENT_H */