diff options
| author | mycroft <mycroft@NetBSD.org> | 1995-03-22 05:24:47 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 1995-03-22 05:24:47 +0000 |
| commit | 6865b2589af012e2ce76cb0528f4eaa49629a1c2 (patch) | |
| tree | 2ebd3279ca685c3f21201072fd02a4989f5073da /sys/compat/linux/linux_misc.c | |
| parent | 87005937ec911725584541d6872cc2f95670fbd3 (diff) | |
Emulate the return value of times() better.
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index c9f461fb008..28a846ae86e 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.3 1995/03/21 13:34:30 mycroft Exp $ */ +/* $NetBSD: linux_misc.c,v 1.4 1995/03/22 05:24:47 mycroft Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -451,7 +451,7 @@ linux_times(p, uap, retval) struct timeval t; struct linux_tms ltms; struct rusage ru; - int error; + int error, s; calcru(p, &ru.ru_utime, &ru.ru_stime, NULL); ltms.ltms_utime = CONVTCK(ru.ru_utime); @@ -463,7 +463,9 @@ linux_times(p, uap, retval) if ((error = copyout(<ms, SCARG(uap, tms), sizeof ltms))) return error; - microtime(&t); + s = splclock(); + timersub(&time, &boottime, &t); + splx(s); retval[0] = ((linux_clock_t)(CONVTCK(t))); return 0; |
