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