summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
committerphk <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
commit5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4 (patch)
tree76909c92c472744745de10e5dacc307ea5f7af45 /sys/kern/kern_synch.c
parentddcbf85eb29fd2d50ce1afa0243be370d4893370 (diff)
downloadFreeBSD-src-5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4.zip
FreeBSD-src-5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4.tar.gz
Time changes mark 2:
* Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index c2f7eb0..4499554 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
- * $Id: kern_synch.c,v 1.52 1998/03/28 11:49:55 dufault Exp $
+ * $Id: kern_synch.c,v 1.53 1998/03/28 18:16:29 dufault Exp $
*/
#include "opt_ktrace.h"
@@ -621,9 +621,9 @@ mi_switch()
* Compute the amount of time during which the current
* process was running, and add that to its total so far.
*/
- microtime(&tv);
- u = p->p_rtime.tv_usec + (tv.tv_usec - runtime.tv_usec);
- s = p->p_rtime.tv_sec + (tv.tv_sec - runtime.tv_sec);
+ microruntime(&tv);
+ u = p->p_rtime.tv_usec + (tv.tv_usec - p->p_runtime.tv_usec);
+ s = p->p_rtime.tv_sec + (tv.tv_sec - p->p_runtime.tv_sec);
if (u < 0) {
u += 1000000;
s--;
@@ -660,7 +660,7 @@ mi_switch()
*/
cnt.v_swtch++;
cpu_switch(p);
- microtime(&runtime);
+ microruntime(&p->p_runtime);
splx(x);
}
OpenPOWER on IntegriCloud