diff options
author | phk <phk@FreeBSD.org> | 1998-04-05 12:10:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-04-05 12:10:41 +0000 |
commit | 2fdb617aeea32dfd81802679bf464f2830001427 (patch) | |
tree | c248aeeadc2e25860ff5145179e20460442bd33f /sys/kern/kern_time.c | |
parent | ef09a47a6d48854c30a7d9923b608ec89b6a4980 (diff) | |
download | FreeBSD-src-2fdb617aeea32dfd81802679bf464f2830001427.zip FreeBSD-src-2fdb617aeea32dfd81802679bf464f2830001427.tar.gz |
More fixes for the iterative case of nanosleep1 from bruce.
I hate the 2-arg time{spec|val}{add|sub} functions!
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 6337414..452e0e0 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.49 1998/04/05 11:17:19 peter Exp $ + * $Id: kern_time.c,v 1.50 1998/04/05 11:49:36 phk Exp $ */ #include <sys/param.h> @@ -194,7 +194,7 @@ nanosleep1(p, rqt, rmt) struct proc *p; struct timespec *rqt, *rmt; { - struct timespec ts, ts2; + struct timespec ts, ts2, ts3; struct timeval tv; int error; @@ -222,9 +222,9 @@ nanosleep1(p, rqt, rmt) } if (timespeccmp(&ts2, &ts, >=)) return (0); - getnanoruntime(&ts2); - timespecsub(&ts2, &ts); - TIMESPEC_TO_TIMEVAL(&tv, &ts2); + ts3 = ts; + timespecsub(&ts3, &ts2); + TIMESPEC_TO_TIMEVAL(&tv, &ts3); } } |