ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
[deliverable/linux.git] / arch / cris / include / asm / thread_info.h
CommitLineData
1da177e4
LT
1/* thread_info.h: CRIS low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 *
6 * CRIS port by Axis Communications
7 */
8
9#ifndef _ASM_THREAD_INFO_H
10#define _ASM_THREAD_INFO_H
11
12#ifdef __KERNEL__
13
14#ifndef __ASSEMBLY__
15#include <asm/types.h>
16#include <asm/processor.h>
556dcee7 17#include <arch/thread_info.h>
1da177e4
LT
18#include <asm/segment.h>
19#endif
20
21
22/*
23 * low level task data that entry.S needs immediate access to
24 * - this struct should fit entirely inside of one cache line
25 * - this struct shares the supervisor stack pages
26 * - if the contents of this structure are changed, the assembly constants must also be changed
27 */
28#ifndef __ASSEMBLY__
29struct thread_info {
30 struct task_struct *task; /* main task structure */
31 struct exec_domain *exec_domain; /* execution domain */
32 unsigned long flags; /* low level flags */
33 __u32 cpu; /* current CPU */
dcd497f9 34 int preempt_count; /* 0 => preemptable, <0 => BUG */
7b275523 35 __u32 tls; /* TLS for this thread */
1da177e4
LT
36
37 mm_segment_t addr_limit; /* thread address space:
38 0-0xBFFFFFFF for user-thead
39 0-0xFFFFFFFF for kernel-thread
40 */
41 struct restart_block restart_block;
42 __u8 supervisor_stack[0];
43};
44
45#endif
46
5d01e6ce 47#define PREEMPT_ACTIVE 0x10000000
1da177e4
LT
48
49/*
50 * macros/functions for gaining access to the thread information structure
1da177e4
LT
51 */
52#ifndef __ASSEMBLY__
53#define INIT_THREAD_INFO(tsk) \
54{ \
55 .task = &tsk, \
56 .exec_domain = &default_exec_domain, \
57 .flags = 0, \
58 .cpu = 0, \
c99e6efe 59 .preempt_count = INIT_PREEMPT_COUNT, \
1da177e4
LT
60 .addr_limit = KERNEL_DS, \
61 .restart_block = { \
62 .fn = do_no_restart_syscall, \
63 }, \
64}
65
66#define init_thread_info (init_thread_union.thread_info)
67
1da177e4
LT
68#endif /* !__ASSEMBLY__ */
69
70/*
71 * thread information flags
72 * - these are process state flags that various assembly files may need to access
73 * - pending work-to-be-done flags are in LSW
74 * - other flags in MSW
75 */
76#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
7b275523
JN
77#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
78#define TIF_SIGPENDING 2 /* signal pending */
79#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
80#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
1da177e4 81#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
0ddc9324 82#define TIF_MEMDIE 17 /* is terminating due to OOM killer */
1da177e4
LT
83
84#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
7b275523 85#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
1da177e4
LT
86#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
87#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
7b275523 88#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
1da177e4
LT
89#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
90
91#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
92#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
93
94#endif /* __KERNEL__ */
95
96#endif /* _ASM_THREAD_INFO_H */
This page took 0.960067 seconds and 5 git commands to generate.