Deleted Added
full compact
kern_clock.c (81117) kern_clock.c (81493)
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
39 * $FreeBSD: head/sys/kern/kern_clock.c 81117 2001-08-03 20:54:41Z jhb $
39 * $FreeBSD: head/sys/kern/kern_clock.c 81493 2001-08-10 22:53:32Z jhb $
40 */
41
42#include "opt_ntp.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/dkstat.h>
47#include <sys/callout.h>

--- 119 unchanged lines hidden (view full) ---

167
168 /*
169 * Run current process's virtual and profile time, as needed.
170 */
171 mtx_assert(&sched_lock, MA_OWNED);
172 pstats = p->p_stats;
173 if (user &&
174 timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&
40 */
41
42#include "opt_ntp.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/dkstat.h>
47#include <sys/callout.h>

--- 119 unchanged lines hidden (view full) ---

167
168 /*
169 * Run current process's virtual and profile time, as needed.
170 */
171 mtx_assert(&sched_lock, MA_OWNED);
172 pstats = p->p_stats;
173 if (user &&
174 timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&
175 itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) {
176 p->p_sflag |= PS_ALRMPEND;
177 aston(p);
178 }
175 itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0)
176 p->p_sflag |= PS_ALRMPEND | PS_ASTPENDING;
179 if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
177 if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
180 itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) {
181 p->p_sflag |= PS_PROFPEND;
182 aston(p);
183 }
178 itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0)
179 p->p_sflag |= PS_PROFPEND | PS_ASTPENDING;
184}
185
186/*
187 * The real-time timer, interrupting hz times per second.
188 */
189void
190hardclock(frame)
191 register struct clockframe *frame;

--- 285 unchanged lines hidden ---
180}
181
182/*
183 * The real-time timer, interrupting hz times per second.
184 */
185void
186hardclock(frame)
187 register struct clockframe *frame;

--- 285 unchanged lines hidden ---