https://github.com/torvalds/linux
Raw File
Tip revision: 101142c37be8e5af9b847860219217e6b958c739 authored by Linus Torvalds on 15 February 2008, 20:57:20 UTC
Linux 2.6.25-rc2
Tip revision: 101142c
current_64.h
#ifndef _X86_64_CURRENT_H
#define _X86_64_CURRENT_H

#if !defined(__ASSEMBLY__) 
struct task_struct;

#include <asm/pda.h>

static inline struct task_struct *get_current(void) 
{ 
	struct task_struct *t = read_pda(pcurrent); 
	return t;
} 

#define current get_current()

#else

#ifndef ASM_OFFSET_H
#include <asm/asm-offsets.h> 
#endif

#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg

#endif

#endif /* !(_X86_64_CURRENT_H) */
back to top