thread_info.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * S390 version
  3. * Copyright IBM Corp. 2002, 2006
  4. * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
  5. */
  6. #ifndef _ASM_THREAD_INFO_H
  7. #define _ASM_THREAD_INFO_H
  8. #include <linux/const.h>
  9. /*
  10. * Size of kernel stack for each process
  11. */
  12. #define THREAD_SIZE_ORDER 2
  13. #define ASYNC_ORDER 2
  14. #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
  15. #define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER)
  16. #ifndef __ASSEMBLY__
  17. #include <asm/lowcore.h>
  18. #include <asm/page.h>
  19. #include <asm/processor.h>
  20. /*
  21. * low level task data that entry.S needs immediate access to
  22. * - this struct should fit entirely inside of one cache line
  23. * - this struct shares the supervisor stack pages
  24. * - if the contents of this structure are changed, the assembly constants must also be changed
  25. */
  26. struct thread_info {
  27. unsigned long flags; /* low level flags */
  28. };
  29. /*
  30. * macros/functions for gaining access to the thread information structure
  31. */
  32. #define INIT_THREAD_INFO(tsk) \
  33. { \
  34. .flags = 0, \
  35. }
  36. #define init_stack (init_thread_union.stack)
  37. void arch_release_task_struct(struct task_struct *tsk);
  38. int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
  39. #endif
  40. /*
  41. * thread information flags bit numbers
  42. */
  43. #define TIF_NOTIFY_RESUME 0 /* callback before returning to user */
  44. #define TIF_SIGPENDING 1 /* signal pending */
  45. #define TIF_NEED_RESCHED 2 /* rescheduling necessary */
  46. #define TIF_SYSCALL_TRACE 3 /* syscall trace active */
  47. #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
  48. #define TIF_SECCOMP 5 /* secure computing */
  49. #define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
  50. #define TIF_UPROBE 7 /* breakpointed or single-stepping */
  51. #define TIF_31BIT 16 /* 32bit process */
  52. #define TIF_MEMDIE 17 /* is terminating due to OOM killer */
  53. #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal() */
  54. #define TIF_SINGLE_STEP 19 /* This task is single stepped */
  55. #define TIF_BLOCK_STEP 20 /* This task is block stepped */
  56. #define TIF_UPROBE_SINGLESTEP 21 /* This task is uprobe single stepped */
  57. #define _TIF_NOTIFY_RESUME _BITUL(TIF_NOTIFY_RESUME)
  58. #define _TIF_SIGPENDING _BITUL(TIF_SIGPENDING)
  59. #define _TIF_NEED_RESCHED _BITUL(TIF_NEED_RESCHED)
  60. #define _TIF_SYSCALL_TRACE _BITUL(TIF_SYSCALL_TRACE)
  61. #define _TIF_SYSCALL_AUDIT _BITUL(TIF_SYSCALL_AUDIT)
  62. #define _TIF_SECCOMP _BITUL(TIF_SECCOMP)
  63. #define _TIF_SYSCALL_TRACEPOINT _BITUL(TIF_SYSCALL_TRACEPOINT)
  64. #define _TIF_UPROBE _BITUL(TIF_UPROBE)
  65. #define _TIF_31BIT _BITUL(TIF_31BIT)
  66. #define _TIF_SINGLE_STEP _BITUL(TIF_SINGLE_STEP)
  67. #endif /* _ASM_THREAD_INFO_H */