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 __ASSEMBLY__ 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 47 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 48 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 49 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 50 #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) 51 #define _TIF_MEMDIE (1 << TIF_MEMDIE) 52 #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 53 #define _TIF_SECCOMP (1 << TIF_SECCOMP) 54 #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 55 56 #endif 57