diff options
author | Bosko Milekic <bmilekic@FreeBSD.org> | 2001-02-09 06:11:45 +0000 |
---|---|---|
committer | Bosko Milekic <bmilekic@FreeBSD.org> | 2001-02-09 06:11:45 +0000 |
commit | 9ed346bab02c967ac656a58bc024f9505d8e3d7a (patch) | |
tree | d3c094e833fc39df4460403c9499fab2981579c4 /sys/kern/kern_clock.c | |
parent | c27eb220c245e2b0f32d16a84d5edb3e42ccd2f8 (diff) | |
download | src-9ed346bab02c967ac656a58bc024f9505d8e3d7a.tar.gz src-9ed346bab02c967ac656a58bc024f9505d8e3d7a.zip |
Notes
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 6d45911d9dd8..0743c6cf7bab 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -170,17 +170,17 @@ hardclock(frame) if (CLKF_USERMODE(frame) && timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) && itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) { - mtx_enter(&sched_lock, MTX_SPIN); + mtx_lock_spin(&sched_lock); p->p_sflag |= PS_ALRMPEND; aston(); - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); } if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) && itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) { - mtx_enter(&sched_lock, MTX_SPIN); + mtx_lock_spin(&sched_lock); p->p_sflag |= PS_PROFPEND; aston(); - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); } } @@ -200,13 +200,13 @@ hardclock(frame) * Process callouts at a very low cpu priority, so we don't keep the * relatively high clock interrupt priority any longer than necessary. */ - mtx_enter(&callout_lock, MTX_SPIN); + mtx_lock_spin(&callout_lock); ticks++; if (TAILQ_FIRST(&callwheel[ticks & callwheelmask]) != NULL) { need_softclock = 1; } else if (softticks + 1 == ticks) ++softticks; - mtx_exit(&callout_lock, MTX_SPIN); + mtx_unlock_spin(&callout_lock); /* * sched_swi acquires sched_lock, so we don't want to call it with @@ -292,7 +292,7 @@ startprofclock(p) * it should be protected later on by a time_lock, which would * cover psdiv, etc. as well. */ - mtx_enter(&sched_lock, MTX_SPIN); + mtx_lock_spin(&sched_lock); if ((p->p_sflag & PS_PROFIL) == 0) { p->p_sflag |= PS_PROFIL; if (++profprocs == 1 && stathz != 0) { @@ -302,7 +302,7 @@ startprofclock(p) splx(s); } } - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); } /* @@ -314,7 +314,7 @@ stopprofclock(p) { int s; - mtx_enter(&sched_lock, MTX_SPIN); + mtx_lock_spin(&sched_lock); if (p->p_sflag & PS_PROFIL) { p->p_sflag &= ~PS_PROFIL; if (--profprocs == 0 && stathz != 0) { @@ -324,7 +324,7 @@ stopprofclock(p) splx(s); } } - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); } /* @@ -347,7 +347,7 @@ statclock(frame) struct rusage *ru; struct vmspace *vm; - mtx_enter(&sched_lock, MTX_SPIN); + mtx_lock_spin(&sched_lock); if (CLKF_USERMODE(frame)) { /* @@ -362,7 +362,7 @@ statclock(frame) forward_statclock(pscnt); #endif if (--pscnt > 0) { - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); return; } /* @@ -392,7 +392,7 @@ statclock(frame) forward_statclock(pscnt); #endif if (--pscnt > 0) { - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); return; } /* @@ -435,7 +435,7 @@ statclock(frame) ru->ru_maxrss = rss; } - mtx_exit(&sched_lock, MTX_SPIN); + mtx_unlock_spin(&sched_lock); } /* |