Streamline updating of switchtime (don't copy code from kern_sync.c).

Submitted by:	jhb
This commit is contained in:
Tor Egge 2001-02-22 20:16:51 +00:00
parent 35030da9f8
commit 9d0ddf1861
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72921

View file

@ -118,7 +118,6 @@ exit1(p, rv)
register struct proc *q, *nq;
register struct vmspace *vm;
struct exitlist *ep;
struct timeval new_switchtime;
if (p->p_pid == 1) {
printf("init died (signal %d, exit %d)\n",
@ -327,10 +326,9 @@ exit1(p, rv)
* counted somewhere if possible.
*/
mtx_lock_spin(&sched_lock);
microuptime(&new_switchtime);
PCPU_SET(switchtime, new_switchtime);
mtx_unlock_spin(&sched_lock);
microuptime(PCPU_PTR(switchtime));
PCPU_SET(switchticks, ticks);
mtx_unlock_spin(&sched_lock);
/*
* notify interested parties of our demise.