2005-04-16 18:20:36 -04:00
|
|
|
#ifndef _I386_CURRENT_H
|
|
|
|
#define _I386_CURRENT_H
|
|
|
|
|
2006-12-06 20:14:03 -05:00
|
|
|
#include <linux/compiler.h>
|
2007-05-02 13:27:16 -04:00
|
|
|
#include <asm/percpu.h>
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
struct task_struct;
|
|
|
|
|
2007-05-02 13:27:16 -04:00
|
|
|
DECLARE_PER_CPU(struct task_struct *, current_task);
|
2006-12-06 20:14:03 -05:00
|
|
|
static __always_inline struct task_struct *get_current(void)
|
2005-04-16 18:20:36 -04:00
|
|
|
{
|
2007-05-02 13:27:16 -04:00
|
|
|
return x86_read_percpu(current_task);
|
2005-04-16 18:20:36 -04:00
|
|
|
}
|
2008-03-23 04:01:55 -04:00
|
|
|
|
2005-04-16 18:20:36 -04:00
|
|
|
#define current get_current()
|
|
|
|
|
|
|
|
#endif /* !(_I386_CURRENT_H) */
|