summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorHarald Koerfgen <hkoerfg@web.de>1999-07-01 20:01:45 +0000
committerHarald Koerfgen <hkoerfg@web.de>1999-07-01 20:01:45 +0000
commit70144bd759c9dfed330bb20d2a5341f7fe0fb036 (patch)
treeded5e44d81a4813738f84a38248a1d3efb9743ff /kernel/sys.c
parentf7daca613c975ee4e698ddbb113ee698a3b28829 (diff)
Fix for HZ != 100 on DECstations
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c10
1 files changed, 8 insertions, 2 deletions
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, &current->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);
}
/*