Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef _ASM_M68K_THREAD_INFO_H |
2 | #define _ASM_M68K_THREAD_INFO_H | |
3 | ||
4 | #include <asm/types.h> | |
1da177e4 LT |
5 | #include <asm/page.h> |
6 | ||
7 | struct thread_info { | |
8 | struct task_struct *task; /* main task structure */ | |
3b66a1ed | 9 | unsigned long flags; |
1da177e4 | 10 | struct exec_domain *exec_domain; /* execution domain */ |
dcd497f9 | 11 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
1da177e4 LT |
12 | __u32 cpu; /* should always be 0 on m68k */ |
13 | struct restart_block restart_block; | |
1da177e4 LT |
14 | }; |
15 | ||
16 | #define PREEMPT_ACTIVE 0x4000000 | |
17 | ||
18 | #define INIT_THREAD_INFO(tsk) \ | |
19 | { \ | |
20 | .task = &tsk, \ | |
21 | .exec_domain = &default_exec_domain, \ | |
c99e6efe | 22 | .preempt_count = INIT_PREEMPT_COUNT, \ |
1da177e4 LT |
23 | .restart_block = { \ |
24 | .fn = do_no_restart_syscall, \ | |
25 | }, \ | |
26 | } | |
27 | ||
28 | /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ | |
b69c49b7 | 29 | #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT) |
1da177e4 | 30 | |
abd03753 | 31 | #define init_thread_info (init_task.thread.info) |
1da177e4 LT |
32 | #define init_stack (init_thread_union.stack) |
33 | ||
abd03753 | 34 | #define task_thread_info(tsk) (&(tsk)->thread.info) |
f7e4217b | 35 | #define task_stack_page(tsk) ((tsk)->stack) |
abd03753 | 36 | #define current_thread_info() task_thread_info(current) |
1da177e4 LT |
37 | |
38 | #define __HAVE_THREAD_FUNCTIONS | |
39 | ||
abd03753 | 40 | #define setup_thread_stack(p, org) ({ \ |
f7e4217b | 41 | *(struct task_struct **)(p)->stack = (p); \ |
abd03753 AV |
42 | task_thread_info(p)->task = (p); \ |
43 | }) | |
44 | ||
f7e4217b | 45 | #define end_of_stack(p) ((unsigned long *)(p)->stack + 1) |
abd03753 | 46 | |
3b66a1ed RZ |
47 | /* entry.S relies on these definitions! |
48 | * bits 0-7 are tested at every exception exit | |
49 | * bits 8-15 are also tested at syscall exit | |
1da177e4 | 50 | */ |
3b66a1ed RZ |
51 | #define TIF_SIGPENDING 6 /* signal pending */ |
52 | #define TIF_NEED_RESCHED 7 /* rescheduling necessary */ | |
53 | #define TIF_DELAYED_TRACE 14 /* single step a syscall */ | |
54 | #define TIF_SYSCALL_TRACE 15 /* syscall trace active */ | |
55 | #define TIF_MEMDIE 16 | |
83224b08 | 56 | #define TIF_FREEZE 17 /* thread is freezing for suspend */ |
1da177e4 LT |
57 | |
58 | #endif /* _ASM_M68K_THREAD_INFO_H */ |