summaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/current.h
blob: f3452d3404aacb2da27cc09163cb6c4179c12467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _PARISC_CURRENT_H
#define _PARISC_CURRENT_H

#include <asm/processor.h>

struct task_struct;

static inline struct task_struct * get_current(void)
{
	struct task_struct *current;

	asm("copy 30,%0" : "=r" (current));
	
	return (struct task_struct *)((long) current & ~(THREAD_SIZE-1));
}
 
#define current get_current()

#endif /* !(_PARISC_CURRENT_H) */