| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __UM_THREAD_INFO_H |
| 7 |
#define __UM_THREAD_INFO_H |
| 8 |
|
| 9 |
#define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER |
| 10 |
#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) |
| 11 |
|
| 12 |
#ifndef __ASSEMBLER__ |
| 13 |
|
| 14 |
#include <asm/types.h> |
| 15 |
#include <asm/page.h> |
| 16 |
#include <asm/segment.h> |
| 17 |
#include <sysdep/ptrace_user.h> |
| 18 |
|
| 19 |
struct thread_info { |
| 20 |
unsigned long flags; /* low level flags */ |
| 21 |
__u32 cpu; /* current CPU */ |
| 22 |
int preempt_count; /* 0 => preemptable, |
| 23 |
<0 => BUG */ |
| 24 |
}; |
| 25 |
|
| 26 |
#define INIT_THREAD_INFO(tsk) \ |
| 27 |
{ \ |
| 28 |
.flags = 0, \ |
| 29 |
.cpu = 0, \ |
| 30 |
.preempt_count = INIT_PREEMPT_COUNT, \ |
| 31 |
} |
| 32 |
|
| 33 |
#endif |
| 34 |
|
| 35 |
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
| 36 |
#define TIF_SIGPENDING 1 /* signal pending */ |
| 37 |
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
| 38 |
#define TIF_NOTIFY_SIGNAL 3 /* signal notifications exist */ |
| 39 |
#define TIF_RESTART_BLOCK 4 |
| 40 |
#define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
| 41 |
#define TIF_SYSCALL_AUDIT 6 |
| 42 |
#define TIF_RESTORE_SIGMASK 7 |
| 43 |
#define TIF_NOTIFY_RESUME 8 |
| 44 |
#define TIF_SECCOMP 9 /* secure computing */ |
| 45 |
#define TIF_SINGLESTEP 10 /* single stepping userspace */ |
| 46 |
#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ |
| 47 |
|
| 48 |
|
| 49 |
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
| 50 |
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
| 51 |
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
| 52 |
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) |
| 53 |
#define _TIF_MEMDIE (1 << TIF_MEMDIE) |
| 54 |
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
| 55 |
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
| 56 |
#define _TIF_SECCOMP (1 << TIF_SECCOMP) |
| 57 |
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
| 58 |
|
| 59 |
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL | \ |
| 60 |
_TIF_NOTIFY_RESUME) |
| 61 |
|
| 62 |
#endif |