vserver 1.9.3
[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_thread \
20         ({ int dummy; ((struct thread_info *) CURRENT_THREAD(dummy)); })
21
22 #define current (current_thread->task)
23
24 #endif /* __ASSEMBLY__ */
25
26 #endif
27
28 /*
29  * Overrides for Emacs so that we follow Linus's tabbing style.
30  * Emacs will notice this stuff at the end of the file and automatically
31  * adjust the settings for this buffer only.  This must remain at the end
32  * of the file.
33  * ---------------------------------------------------------------------------
34  * Local variables:
35  * c-file-style: "linux"
36  * End:
37  */