exit cleanly when kompare is piped to another application and this pipe is closed
[linux-2.6.git] / include / asm-h8300 / thread_info.h
index 226ed1d..45f09dc 100644 (file)
@@ -23,7 +23,7 @@ struct thread_info {
        struct exec_domain *exec_domain;        /* execution domain */
        unsigned long      flags;               /* low level flags */
        int                cpu;                 /* cpu we're on */
-       int                preempt_count;       /* 0 => preemptable, <0 => BUG*/
+       int                preempt_count;       /* 0 => preemptable, <0 => BUG */
        struct restart_block restart_block;
 };
 
@@ -32,10 +32,11 @@ struct thread_info {
  */
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
-       task:           &tsk,                   \
-       exec_domain:    &default_exec_domain,   \
-       flags:          0,                      \
-       cpu:            0,                      \
+       .task =         &tsk,                   \
+       .exec_domain =  &default_exec_domain,   \
+       .flags =        0,                      \
+       .cpu =          0,                      \
+       .preempt_count = 1,                     \
        .restart_block  = {                     \
                .fn = do_no_restart_syscall,    \
        },                                      \
@@ -59,7 +60,7 @@ static inline struct thread_info *current_thread_info(void)
                "mov.l  sp, %0 \n\t"
                "and.l  %1, %0"
                : "=&r"(ti)
-               : "g" (~(THREAD_SIZE-1))
+               : "i" (~(THREAD_SIZE-1))
                );
        return ti;
 }
@@ -68,8 +69,6 @@ static inline struct thread_info *current_thread_info(void)
 #define alloc_thread_info(tsk) ((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)
 #endif /* __ASSEMBLY__ */
 
 /*
@@ -79,6 +78,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TI_EXECDOMAIN  4
 #define TI_FLAGS       8
 #define TI_CPU         12
+#define TI_PRE_COUNT   16
 
 #define        PREEMPT_ACTIVE  0x4000000
 
@@ -91,6 +91,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_NEED_RESCHED       3       /* rescheduling necessary */
 #define TIF_POLLING_NRFLAG     4       /* true if poll_idle() is polling
                                           TIF_NEED_RESCHED */
+#define TIF_MEMDIE             5
 
 /* as above, but as bit values */
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)