ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-um / current.h
1 /* 
2  * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __UM_CURRENT_H
7 #define __UM_CURRENT_H
8
9 #ifndef __ASSEMBLY__
10
11 struct thread_info;
12
13 #include "linux/config.h"
14 #include "asm/page.h"
15
16 #define CURRENT_THREAD(dummy) (((unsigned long) &dummy) & \
17                                 (PAGE_MASK << CONFIG_KERNEL_STACK_ORDER))
18
19 #define current ({ int dummy; \
20                    ((struct thread_info *) CURRENT_THREAD(dummy))->task; })
21
22 #endif /* __ASSEMBLY__ */
23
24 #endif
25
26 /*
27  * Overrides for Emacs so that we follow Linus's tabbing style.
28  * Emacs will notice this stuff at the end of the file and automatically
29  * adjust the settings for this buffer only.  This must remain at the end
30  * of the file.
31  * ---------------------------------------------------------------------------
32  * Local variables:
33  * c-file-style: "linux"
34  * End:
35  */