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