allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / include / asm-m68k / thread_info.h
blobd635a375248896149ba6a14fcfc7392ca62873f0
1 #ifndef _ASM_M68K_THREAD_INFO_H
2 #define _ASM_M68K_THREAD_INFO_H
4 #include <asm/types.h>
5 #include <asm/page.h>
7 struct thread_info {
8 struct task_struct *task; /* main task structure */
9 unsigned long flags;
10 struct exec_domain *exec_domain; /* execution domain */
11 int preempt_count; /* 0 => preemptable, <0 => BUG */
12 __u32 cpu; /* should always be 0 on m68k */
13 struct restart_block restart_block;
16 #define PREEMPT_ACTIVE 0x4000000
18 #define INIT_THREAD_INFO(tsk) \
19 { \
20 .task = &tsk, \
21 .exec_domain = &default_exec_domain, \
22 .restart_block = { \
23 .fn = do_no_restart_syscall, \
24 }, \
27 /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
28 #if PAGE_SHIFT == 13 /* 8k machines */
29 #define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,0))
30 #define free_thread_info(ti) free_pages((unsigned long)(ti),0)
31 #else /* otherwise assume 4k pages */
32 #define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,1))
33 #define free_thread_info(ti) free_pages((unsigned long)(ti),1)
34 #endif /* PAGE_SHIFT == 13 */
36 #define init_thread_info (init_task.thread.info)
37 #define init_stack (init_thread_union.stack)
39 #define task_thread_info(tsk) (&(tsk)->thread.info)
40 #define task_stack_page(tsk) ((tsk)->stack)
41 #define current_thread_info() task_thread_info(current)
43 #define __HAVE_THREAD_FUNCTIONS
45 #define setup_thread_stack(p, org) ({ \
46 *(struct task_struct **)(p)->stack = (p); \
47 task_thread_info(p)->task = (p); \
50 #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
52 /* entry.S relies on these definitions!
53 * bits 0-7 are tested at every exception exit
54 * bits 8-15 are also tested at syscall exit
56 #define TIF_SIGPENDING 6 /* signal pending */
57 #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
58 #define TIF_DELAYED_TRACE 14 /* single step a syscall */
59 #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
60 #define TIF_MEMDIE 16
62 #endif /* _ASM_M68K_THREAD_INFO_H */