1 #ifndef _ASM_M68K_THREAD_INFO_H
2 #define _ASM_M68K_THREAD_INFO_H
5 #include <asm/asm-offsets.h>
11 #include <asm/current.h>
14 struct task_struct *task; /* main task structure */
16 struct exec_domain *exec_domain; /* execution domain */
17 int preempt_count; /* 0 => preemptable, <0 => BUG */
18 __u32 cpu; /* should always be 0 on m68k */
19 unsigned long tp_value; /* thread pointer */
20 struct restart_block restart_block;
22 #endif /* __ASSEMBLY__ */
24 #define PREEMPT_ACTIVE 0x4000000
26 #define INIT_THREAD_INFO(tsk) \
29 .exec_domain = &default_exec_domain, \
30 .preempt_count = INIT_PREEMPT_COUNT, \
32 .fn = do_no_restart_syscall, \
36 /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
37 #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
39 #define init_thread_info (init_task.thread.info)
40 #define init_stack (init_thread_union.stack)
43 #define task_thread_info(tsk) ((struct thread_info *) NULL)
45 #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_TINFO))
48 #define task_stack_page(tsk) ((tsk)->stack)
49 #define current_thread_info() task_thread_info(current)
51 #define __HAVE_THREAD_FUNCTIONS
53 #define setup_thread_stack(p, org) ({ \
54 *(struct task_struct **)(p)->stack = (p); \
55 task_thread_info(p)->task = (p); \
58 #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
60 /* entry.S relies on these definitions!
61 * bits 0-7 are tested at every exception exit
62 * bits 8-15 are also tested at syscall exit
64 #define TIF_SIGPENDING 6 /* signal pending */
65 #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
66 #define TIF_DELAYED_TRACE 14 /* single step a syscall */
67 #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
69 #define TIF_FREEZE 17 /* thread is freezing for suspend */
71 #endif /* _ASM_M68K_THREAD_INFO_H */