1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_GENERIC_THREAD_INFO_TIF_H_
3#define _ASM_GENERIC_THREAD_INFO_TIF_H_
4
5#include <vdso/bits.h>
6
7/* Bits 16-31 are reserved for architecture specific purposes */
8
9#define TIF_NOTIFY_RESUME 0 // callback before returning to user
10#define _TIF_NOTIFY_RESUME BIT(TIF_NOTIFY_RESUME)
11
12#define TIF_SIGPENDING 1 // signal pending
13#define _TIF_SIGPENDING BIT(TIF_SIGPENDING)
14
15#define TIF_NOTIFY_SIGNAL 2 // signal notifications exist
16#define _TIF_NOTIFY_SIGNAL BIT(TIF_NOTIFY_SIGNAL)
17
18#define TIF_MEMDIE 3 // is terminating due to OOM killer
19#define _TIF_MEMDIE BIT(TIF_MEMDIE)
20
21#define TIF_NEED_RESCHED 4 // rescheduling necessary
22#define _TIF_NEED_RESCHED BIT(TIF_NEED_RESCHED)
23
24#ifdef HAVE_TIF_NEED_RESCHED_LAZY
25# define TIF_NEED_RESCHED_LAZY 5 // Lazy rescheduling needed
26# define _TIF_NEED_RESCHED_LAZY BIT(TIF_NEED_RESCHED_LAZY)
27#endif
28
29#ifdef HAVE_TIF_POLLING_NRFLAG
30# define TIF_POLLING_NRFLAG 6 // idle is polling for TIF_NEED_RESCHED
31# define _TIF_POLLING_NRFLAG BIT(TIF_POLLING_NRFLAG)
32#endif
33
34#define TIF_USER_RETURN_NOTIFY 7 // notify kernel of userspace return
35#define _TIF_USER_RETURN_NOTIFY BIT(TIF_USER_RETURN_NOTIFY)
36
37#define TIF_UPROBE 8 // breakpointed or singlestepping
38#define _TIF_UPROBE BIT(TIF_UPROBE)
39
40#define TIF_PATCH_PENDING 9 // pending live patching update
41#define _TIF_PATCH_PENDING BIT(TIF_PATCH_PENDING)
42
43#ifdef HAVE_TIF_RESTORE_SIGMASK
44# define TIF_RESTORE_SIGMASK 10 // Restore signal mask in do_signal() */
45# define _TIF_RESTORE_SIGMASK BIT(TIF_RESTORE_SIGMASK)
46#endif
47
48#endif /* _ASM_GENERIC_THREAD_INFO_TIF_H_ */
49