projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
386BSD 0.1 development
[unix-history]
/
usr
/
src
/
sys.386bsd
/
kern
/
kern_clock.c
diff --git
a/usr/src/sys.386bsd/kern/kern_clock.c
b/usr/src/sys.386bsd/kern/kern_clock.c
index
3d2a6ac
..
af7f75b
100644
(file)
--- a/
usr/src/sys.386bsd/kern/kern_clock.c
+++ b/
usr/src/sys.386bsd/kern/kern_clock.c
@@
-276,7
+276,7
@@
gatherstats(framep)
if (curproc == NULL && CLKF_BASEPRI(framep))
cpstate = CP_IDLE;
#ifdef GPROF
if (curproc == NULL && CLKF_BASEPRI(framep))
cpstate = CP_IDLE;
#ifdef GPROF
- s =
CLKF_PC(framep) -
s_lowpc;
+ s =
(u_long) CLKF_PC(framep) - (u_long)
s_lowpc;
if (profiling < 2 && s < s_textsize)
kcount[s / (HISTFRACTION * sizeof (*kcount))]++;
#endif
if (profiling < 2 && s < s_textsize)
kcount[s / (HISTFRACTION * sizeof (*kcount))]++;
#endif
@@
-319,6
+319,12
@@
softclock(frame)
splx(s);
(*func)(arg, a);
}
splx(s);
(*func)(arg, a);
}
+
+ /*
+ * If no process to work with, we're finished.
+ */
+ if (curproc == 0) return;
+
/*
* If trapped user-mode and profiling, give it
* a profiling tick.
/*
* If trapped user-mode and profiling, give it
* a profiling tick.