Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[deliverable/linux.git] / include / asm-m68k / thread_info.h
CommitLineData
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
7struct 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, \
22 .restart_block = { \
23 .fn = do_no_restart_syscall, \
24 }, \
25}
26
27/* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
b69c49b7 28#define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
1da177e4 29
abd03753 30#define init_thread_info (init_task.thread.info)
1da177e4
LT
31#define init_stack (init_thread_union.stack)
32
abd03753 33#define task_thread_info(tsk) (&(tsk)->thread.info)
f7e4217b 34#define task_stack_page(tsk) ((tsk)->stack)
abd03753 35#define current_thread_info() task_thread_info(current)
1da177e4
LT
36
37#define __HAVE_THREAD_FUNCTIONS
38
abd03753 39#define setup_thread_stack(p, org) ({ \
f7e4217b 40 *(struct task_struct **)(p)->stack = (p); \
abd03753
AV
41 task_thread_info(p)->task = (p); \
42})
43
f7e4217b 44#define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
abd03753 45
3b66a1ed
RZ
46/* entry.S relies on these definitions!
47 * bits 0-7 are tested at every exception exit
48 * bits 8-15 are also tested at syscall exit
1da177e4 49 */
3b66a1ed
RZ
50#define TIF_SIGPENDING 6 /* signal pending */
51#define TIF_NEED_RESCHED 7 /* rescheduling necessary */
52#define TIF_DELAYED_TRACE 14 /* single step a syscall */
53#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
54#define TIF_MEMDIE 16
1da177e4
LT
55
56#endif /* _ASM_M68K_THREAD_INFO_H */
This page took 0.510931 seconds and 5 git commands to generate.