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/sys.c | |
parent | f7daca613c975ee4e698ddbb113ee698a3b28829 (diff) |
Fix for HZ != 100 on DECstations
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 10 |
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, ¤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); } /* |