diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-11 02:32:09 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-11 02:32:09 +0000 |
commit | 7f5ea64ad438953cbeb3055f424dfac01d5bcfc7 (patch) | |
tree | f8cabc30da0d0eaa578cb6369c816e02af148510 /include | |
parent | 99e873a7003ab3980a6296c29066e3ab7956a009 (diff) |
Merge with Linux 2.4.0-test3.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ppc/ptrace.h | 2 | ||||
-rw-r--r-- | include/asm-s390/ptrace.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 35 |
3 files changed, 26 insertions, 13 deletions
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h index f95656dd2..93a75bd87 100644 --- a/include/asm-ppc/ptrace.h +++ b/include/asm-ppc/ptrace.h @@ -49,7 +49,7 @@ struct pt_regs { #define __SIGNAL_FRAMESIZE 64 #define instruction_pointer(regs) ((regs)->nip) -#define user_mode(regs) ((regs)->msr & MSR_PR) +#define user_mode(regs) (((regs)->msr & MSR_PR) != 0) /* * Offsets used by 'ptrace' system call interface. diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index 5986542dd..60a698662 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h @@ -141,7 +141,7 @@ typedef struct user_regs_struct user_regs_struct; typedef struct pt_regs pt_regs; #ifdef __KERNEL__ -#define user_mode(regs) ((regs)->psw.mask & PSW_PROBLEM_STATE) +#define user_mode(regs) (((regs)->psw.mask & PSW_PROBLEM_STATE) != 0) #define instruction_pointer(regs) ((regs)->psw.addr) struct thread_struct; diff --git a/include/linux/sched.h b/include/linux/sched.h index 21c9f9f74..5058586ee 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -248,7 +248,9 @@ struct signal_struct { struct user_struct; struct task_struct { -/* these are hardcoded - don't touch */ + /* + * offsets of these are hardcoded elsewhere - touch with care + */ volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ unsigned long flags; /* per process flags, defined below */ int sigpending; @@ -258,20 +260,29 @@ struct task_struct { */ struct exec_domain *exec_domain; volatile long need_resched; + unsigned long ptrace; - int lock_depth; /* Lock depth. We can context switch in and out of holding a syscall kernel lock... */ -/* begin intel cache line */ + int lock_depth; /* Lock depth */ + +/* + * offset 32 begins here on 32-bit platforms. We keep + * all fields in a single cacheline that are needed for + * the goodness() loop in schedule(). + */ long counter; - long priority; + long nice; unsigned long policy; -/* memory management info */ - struct mm_struct *mm, *active_mm; + struct mm_struct *mm; int has_cpu, processor; unsigned long cpus_allowed; - unsigned long ptrace; + /* + * (only the 'next' pointer fits into the cacheline, but + * that's just fine.) + */ struct list_head run_list; + struct task_struct *next_task, *prev_task; - int last_processor; + struct mm_struct *active_mm; /* task state */ struct linux_binfmt *binfmt; @@ -379,7 +390,9 @@ struct task_struct { */ #define _STK_LIM (8*1024*1024) -#define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */ +#define DEF_COUNTER (10*HZ/100) /* 100 ms time slice */ +#define MAX_COUNTER (20*HZ/100) +#define DEF_NICE (0) /* * INIT_TASK is used to set up the first task table, touch at @@ -393,8 +406,8 @@ struct task_struct { addr_limit: KERNEL_DS, \ exec_domain: &default_exec_domain, \ lock_depth: -1, \ - counter: DEF_PRIORITY, \ - priority: DEF_PRIORITY, \ + counter: DEF_COUNTER, \ + nice: DEF_NICE, \ policy: SCHED_OTHER, \ mm: NULL, \ active_mm: &init_mm, \ |