1 #ifndef _ASM_PARISC_THREAD_INFO_H
2 #define _ASM_PARISC_THREAD_INFO_H
7 #include <asm/processor.h>
10 struct task_struct
*task
; /* main task structure */
11 struct exec_domain
*exec_domain
;/* execution domain */
12 unsigned long flags
; /* thread_info flags (see TIF_*) */
13 mm_segment_t addr_limit
; /* user-level address space limit */
14 __u32 cpu
; /* current CPU */
15 int preempt_count
; /* 0=premptable, <0=BUG; will also serve as bh-counter */
16 struct restart_block restart_block
;
19 #define INIT_THREAD_INFO(tsk) \
22 .exec_domain = &default_exec_domain, \
25 .addr_limit = KERNEL_DS, \
26 .preempt_count = INIT_PREEMPT_COUNT, \
28 .fn = do_no_restart_syscall \
32 #define init_thread_info (init_thread_union.thread_info)
33 #define init_stack (init_thread_union.stack)
35 /* how to get the thread information struct from C */
36 #define current_thread_info() ((struct thread_info *)mfctl(30))
38 #endif /* !__ASSEMBLY */
40 /* thread information allocation */
42 #define THREAD_SIZE_ORDER 2
43 /* Be sure to hunt all references to this down when you change the size of
45 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
46 #define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
48 #define PREEMPT_ACTIVE_BIT 28
49 #define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
52 * thread information flags
54 #define TIF_SYSCALL_TRACE 0 /* syscall trace active */
55 #define TIF_SIGPENDING 1 /* signal pending */
56 #define TIF_NEED_RESCHED 2 /* rescheduling necessary */
57 #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling TIF_NEED_RESCHED */
58 #define TIF_32BIT 4 /* 32 bit binary */
60 #define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
61 #define TIF_FREEZE 7 /* is freezing for suspend */
62 #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */
63 #define TIF_SINGLESTEP 9 /* single stepping? */
64 #define TIF_BLOCKSTEP 10 /* branch stepping? */
66 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
67 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
68 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
69 #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
70 #define _TIF_32BIT (1 << TIF_32BIT)
71 #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
72 #define _TIF_FREEZE (1 << TIF_FREEZE)
73 #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
74 #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
75 #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP)
77 #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \
78 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
80 #endif /* __KERNEL__ */
82 #endif /* _ASM_PARISC_THREAD_INFO_H */