diff options
author | Harald Koerfgen <hkoerfg@web.de> | 1999-07-01 20:01:45 +0000 |
---|---|---|
committer | Harald Koerfgen <hkoerfg@web.de> | 1999-07-01 20:01:45 +0000 |
commit | 70144bd759c9dfed330bb20d2a5341f7fe0fb036 (patch) | |
tree | ded5e44d81a4813738f84a38248a1d3efb9743ff /kernel | |
parent | f7daca613c975ee4e698ddbb113ee698a3b28829 (diff) |
Fix for HZ != 100 on DECstations
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 5 | ||||
-rw-r--r-- | kernel/sys.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 9a1cd2ab4..105bb8b1c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -12,6 +12,7 @@ #include <linux/smp_lock.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/param.h> #include <asm/uaccess.h> @@ -585,8 +586,8 @@ notify_parent(struct task_struct *tsk, int sig) info.si_pid = tsk->pid; /* FIXME: find out whether or not this is supposed to be c*time. */ - info.si_utime = tsk->times.tms_utime; - info.si_stime = tsk->times.tms_stime; + info.si_utime = HZ_TO_STD(tsk->times.tms_utime); + info.si_stime = HZ_TO_STD(tsk->times.tms_stime); why = SI_KERNEL; /* shouldn't happen */ switch (tsk->state) { diff --git a/kernel/sys.c b/kernel/sys.c index 5302297d8..4752c9ce6 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -605,6 +605,8 @@ asmlinkage int sys_setfsgid(gid_t gid) asmlinkage long sys_times(struct tms * tbuf) { + struct tms temp; + /* * In the SMP world we might just be unlucky and have one of * the times increment as we use it. Since the value is an @@ -612,9 +614,13 @@ asmlinkage long sys_times(struct tms * tbuf) * as if the syscall took an instant longer to occur. */ if (tbuf) - if (copy_to_user(tbuf, ¤t->times, sizeof(struct tms))) + temp.tms_utime = HZ_TO_STD(current->times.tms_utime); + temp.tms_stime = HZ_TO_STD(current->times.tms_stime); + temp.tms_cutime = HZ_TO_STD(current->times.tms_cutime); + temp.tms_cstime = HZ_TO_STD(current->times.tms_cstime); + if (copy_to_user(tbuf, &temp, sizeof(struct tms))) return -EFAULT; - return jiffies; + return HZ_TO_STD(jiffies); } /* |