• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ASM_M68K_THREAD_INFO_H
2 #define _ASM_M68K_THREAD_INFO_H
3 
4 #include <asm/types.h>
5 #include <asm/page.h>
6 
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;
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 */
28 #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
29 
30 #define init_thread_info	(init_task.thread.info)
31 #define init_stack		(init_thread_union.stack)
32 
33 #define task_thread_info(tsk)	(&(tsk)->thread.info)
34 #define task_stack_page(tsk)	((tsk)->stack)
35 #define current_thread_info()	task_thread_info(current)
36 
37 #define __HAVE_THREAD_FUNCTIONS
38 
39 #define setup_thread_stack(p, org) ({			\
40 	*(struct task_struct **)(p)->stack = (p);	\
41 	task_thread_info(p)->task = (p);		\
42 })
43 
44 #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
45 
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
49  */
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
55 #define TIF_FREEZE		17	/* thread is freezing for suspend */
56 
57 #endif	/* _ASM_M68K_THREAD_INFO_H */
58