[BACK]Return to current_64.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / include / asm-x86

File: [Development] / linux-2.6-xfs / include / asm-x86 / Attic / current_64.h (download)

Revision 1.2, Mon Aug 4 17:03:13 2008 UTC (9 years, 2 months ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.1: +6 -6 lines

Merge up to 2.6.26
Merge of 2.6.x-xfs-melb:linux:31804b by kenmcd.

#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) */