~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/h8300/include/asm/thread_info.h

Version: ~ [ linux-5.5 ] ~ [ linux-5.4.15 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.98 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.167 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.211 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.211 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.81 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* thread_info.h: h8300 low-level thread information
  2  * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp>
  3  *
  4  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
  5  * - Incorporating suggestions made by Linus Torvalds and Dave Miller
  6  */
  7 
  8 #ifndef _ASM_THREAD_INFO_H
  9 #define _ASM_THREAD_INFO_H
 10 
 11 #include <asm/page.h>
 12 
 13 #ifdef __KERNEL__
 14 
 15 #ifndef __ASSEMBLY__
 16 
 17 /*
 18  * low level task data.
 19  * If you change this, change the TI_* offsets below to match.
 20  */
 21 struct thread_info {
 22         struct task_struct *task;               /* main task structure */
 23         struct exec_domain *exec_domain;        /* execution domain */
 24         unsigned long      flags;               /* low level flags */
 25         int                cpu;                 /* cpu we're on */
 26         int                preempt_count;       /* 0 => preemptable, <0 => BUG */
 27         struct restart_block restart_block;
 28 };
 29 
 30 /*
 31  * macros/functions for gaining access to the thread information structure
 32  */
 33 #define INIT_THREAD_INFO(tsk)                   \
 34 {                                               \
 35         .task =         &tsk,                   \
 36         .exec_domain =  &default_exec_domain,   \
 37         .flags =        0,                      \
 38         .cpu =          0,                      \
 39         .preempt_count = INIT_PREEMPT_COUNT,    \
 40         .restart_block  = {                     \
 41                 .fn = do_no_restart_syscall,    \
 42         },                                      \
 43 }
 44 
 45 #define init_thread_info        (init_thread_union.thread_info)
 46 #define init_stack              (init_thread_union.stack)
 47 
 48 
 49 /*
 50  * Size of kernel stack for each process. This must be a power of 2...
 51  */
 52 #define THREAD_SIZE_ORDER       1
 53 #define THREAD_SIZE             8192    /* 2 pages */
 54 
 55 
 56 /* how to get the thread information struct from C */
 57 static inline struct thread_info *current_thread_info(void)
 58 {
 59         struct thread_info *ti;
 60         __asm__(
 61                 "mov.l  sp, %0 \n\t"
 62                 "and.l  %1, %0"
 63                 : "=&r"(ti)
 64                 : "i" (~(THREAD_SIZE-1))
 65                 );
 66         return ti;
 67 }
 68 
 69 #endif /* __ASSEMBLY__ */
 70 
 71 /*
 72  * Offsets in thread_info structure, used in assembly code
 73  */
 74 #define TI_TASK         0
 75 #define TI_EXECDOMAIN   4
 76 #define TI_FLAGS        8
 77 #define TI_CPU          12
 78 #define TI_PRE_COUNT    16
 79 
 80 #define PREEMPT_ACTIVE  0x4000000
 81 
 82 /*
 83  * thread information flag bit numbers
 84  */
 85 #define TIF_SYSCALL_TRACE       0       /* syscall trace active */
 86 #define TIF_SIGPENDING          1       /* signal pending */
 87 #define TIF_NEED_RESCHED        2       /* rescheduling necessary */
 88 #define TIF_POLLING_NRFLAG      3       /* true if poll_idle() is polling
 89                                            TIF_NEED_RESCHED */
 90 #define TIF_MEMDIE              4       /* is terminating due to OOM killer */
 91 #define TIF_RESTORE_SIGMASK     5       /* restore signal mask in do_signal() */
 92 #define TIF_NOTIFY_RESUME       6       /* callback before returning to user */
 93 
 94 /* as above, but as bit values */
 95 #define _TIF_SYSCALL_TRACE      (1<<TIF_SYSCALL_TRACE)
 96 #define _TIF_SIGPENDING         (1<<TIF_SIGPENDING)
 97 #define _TIF_NEED_RESCHED       (1<<TIF_NEED_RESCHED)
 98 #define _TIF_POLLING_NRFLAG     (1<<TIF_POLLING_NRFLAG)
 99 #define _TIF_RESTORE_SIGMASK    (1<<TIF_RESTORE_SIGMASK)
100 #define _TIF_NOTIFY_RESUME      (1 << TIF_NOTIFY_RESUME)
101 
102 #define _TIF_WORK_MASK          0x0000FFFE      /* work to do on interrupt/exception return */
103 
104 #endif /* __KERNEL__ */
105 
106 #endif /* _ASM_THREAD_INFO_H */
107 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp