thread_info_mm.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. struct restart_block restart_block;
  17. };
  18. #endif /* __ASSEMBLY__ */
  19. #define PREEMPT_ACTIVE 0x4000000
  20. #define INIT_THREAD_INFO(tsk) \
  21. { \
  22. .task = &tsk, \
  23. .exec_domain = &default_exec_domain, \
  24. .preempt_count = INIT_PREEMPT_COUNT, \
  25. .restart_block = { \
  26. .fn = do_no_restart_syscall, \
  27. }, \
  28. }
  29. /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
  30. #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
  31. #define init_thread_info (init_task.thread.info)
  32. #define init_stack (init_thread_union.stack)
  33. #ifdef ASM_OFFSETS_C
  34. #define task_thread_info(tsk) ((struct thread_info *) NULL)
  35. #else
  36. #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_TINFO))
  37. #endif
  38. #define task_stack_page(tsk) ((tsk)->stack)
  39. #define current_thread_info() task_thread_info(current)
  40. #define __HAVE_THREAD_FUNCTIONS
  41. #define setup_thread_stack(p, org) ({ \
  42. *(struct task_struct **)(p)->stack = (p); \
  43. task_thread_info(p)->task = (p); \
  44. })
  45. #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
  46. /* entry.S relies on these definitions!
  47. * bits 0-7 are tested at every exception exit
  48. * bits 8-15 are also tested at syscall exit
  49. */
  50. #define TIF_SIGPENDING 6 /* signal pending */
  51. #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
  52. #define TIF_DELAYED_TRACE 14 /* single step a syscall */
  53. #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
  54. #define TIF_MEMDIE 16
  55. #define TIF_FREEZE 17 /* thread is freezing for suspend */
  56. #endif /* _ASM_M68K_THREAD_INFO_H */