cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

current.h (443B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _ASM_X86_CURRENT_H
      3#define _ASM_X86_CURRENT_H
      4
      5#include <linux/compiler.h>
      6#include <asm/percpu.h>
      7
      8#ifndef __ASSEMBLY__
      9struct task_struct;
     10
     11DECLARE_PER_CPU(struct task_struct *, current_task);
     12
     13static __always_inline struct task_struct *get_current(void)
     14{
     15	return this_cpu_read_stable(current_task);
     16}
     17
     18#define current get_current()
     19
     20#endif /* __ASSEMBLY__ */
     21
     22#endif /* _ASM_X86_CURRENT_H */