thread_info_tif.h 1.6 KB

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