]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/x86/include/asm/current.h
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / include / asm / current.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1965aae3
PA
2#ifndef _ASM_X86_CURRENT_H
3#define _ASM_X86_CURRENT_H
f0766440 4
f0766440
CL
5#include <linux/compiler.h>
6#include <asm/percpu.h>
7
c6f5e0ac 8#ifndef __ASSEMBLY__
f0766440
CL
9struct task_struct;
10
11DECLARE_PER_CPU(struct task_struct *, current_task);
f0766440
CL
12
13static __always_inline struct task_struct *get_current(void)
14{
c6ae41e7 15 return this_cpu_read_stable(current_task);
f0766440
CL
16}
17
c6f5e0ac 18#define current get_current()
f0766440
CL
19
20#endif /* __ASSEMBLY__ */
21
1965aae3 22#endif /* _ASM_X86_CURRENT_H */