Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-sh / thread_info.h
index a4a70df..7345350 100644 (file)
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
        struct exec_domain      *exec_domain;   /* execution domain */
-       __u32                   flags;          /* low level flags */
+       unsigned long           flags;          /* low level flags */
        __u32                   cpu;
-       __s32                   preempt_count; /* 0 => preemptable, <0 => BUG */
+       int                     preempt_count; /* 0 => preemptable, <0 => BUG */
        struct restart_block    restart_block;
        __u8                    supervisor_stack[0];
 };
 
-#else /* !__ASSEMBLY__ */
-
-/* offsets into the thread_info struct for assembly code access */
-#define TI_TASK                0x00000000
-#define TI_EXEC_DOMAIN 0x00000004
-#define TI_FLAGS       0x00000008
-#define TI_CPU         0x0000000c
-#define TI_PRE_COUNT   0x00000010
-#define TI_RESTART_BLOCK 0x00000014
-
 #endif
 
-#define PREEMPT_ACTIVE         0x4000000
+#define PREEMPT_ACTIVE         0x10000000
 
 /*
  * macros/functions for gaining access to the thread information structure
@@ -70,8 +60,6 @@ static inline struct thread_info *current_thread_info(void)
 #define THREAD_SIZE (2*PAGE_SIZE)
 #define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
 #define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
-#define get_thread_info(ti) get_task_struct((ti)->task)
-#define put_thread_info(ti) put_task_struct((ti)->task)
 
 #else /* !__ASSEMBLY__ */
 
@@ -93,6 +81,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_NEED_RESCHED       3       /* rescheduling necessary */
 #define TIF_USEDFPU            16      /* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG     17      /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_MEMDIE             18
 #define TIF_USERSPACE          31      /* true if FS sets userspace */
 
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)