thread_info_mm.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef _ASM_M68K_THREAD_INFO_H
  2. #define _ASM_M68K_THREAD_INFO_H
  3. #ifndef ASM_OFFSETS_C
  4. #include <asm/asm-offsets.h>
  5. #endif
  6. #include <asm/types.h>
  7. #include <asm/page.h>
  8. #ifndef __ASSEMBLY__
  9. #include <asm/current.h>
  10. struct thread_info {
  11. struct task_struct *task; /* main task structure */
  12. unsigned long flags;
  13. struct exec_domain *exec_domain; /* execution domain */
  14. int preempt_count; /* 0 => preemptable, <0 => BUG */
  15. __u32 cpu; /* should always be 0 on m68k */
  16. unsigned long tp_value; /* thread pointer */
  17. struct restart_block restart_block;
  18. };
  19. #endif /* __ASSEMBLY__ */
  20. #define PREEMPT_ACTIVE 0x4000000
  21. #define INIT_THREAD_INFO(tsk) \
  22. { \
  23. .task = &tsk, \
  24. .exec_domain = &default_exec_domain, \
  25. .preempt_count = INIT_PREEMPT_COUNT, \
  26. .restart_block = { \
  27. .fn = do_no_restart_syscall, \
  28. }, \
  29. }
  30. /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
  31. #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
  32. #define init_thread_info (init_task.thread.info)
  33. #define init_stack (init_thread_union.stack)
  34. #ifdef ASM_OFFSETS_C
  35. #define task_thread_info(tsk) ((struct thread_info *) NULL)
  36. #else
  37. #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_TINFO))
  38. #endif
  39. #define task_stack_page(tsk) ((tsk)->stack)
  40. #define current_thread_info() task_thread_info(current)
  41. #define __HAVE_THREAD_FUNCTIONS
  42. #define setup_thread_stack(p, org) ({ \
  43. *(struct task_struct **)(p)->stack = (p); \
  44. task_thread_info(p)->task = (p); \
  45. })
  46. #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
  47. /* entry.S relies on these definitions!
  48. * bits 0-7 are tested at every exception exit
  49. * bits 8-15 are also tested at syscall exit
  50. */
  51. #define TIF_SIGPENDING 6 /* signal pending */
  52. #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
  53. #define TIF_DELAYED_TRACE 14 /* single step a syscall */
  54. #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
  55. #define TIF_MEMDIE 16 /* is terminating due to OOM killer */
  56. #define TIF_FREEZE 17 /* thread is freezing for suspend */
  57. #endif /* _ASM_M68K_THREAD_INFO_H */