Deleted Added
full compact
kern_clock.c (72200) kern_clock.c (72238)
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 72200 2001-02-09 06:11:45Z bmilekic $
39 * $FreeBSD: head/sys/kern/kern_clock.c 72238 2001-02-09 17:46:35Z 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>

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

204 ticks++;
205 if (TAILQ_FIRST(&callwheel[ticks & callwheelmask]) != NULL) {
206 need_softclock = 1;
207 } else if (softticks + 1 == ticks)
208 ++softticks;
209 mtx_unlock_spin(&callout_lock);
210
211 /*
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>

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

204 ticks++;
205 if (TAILQ_FIRST(&callwheel[ticks & callwheelmask]) != NULL) {
206 need_softclock = 1;
207 } else if (softticks + 1 == ticks)
208 ++softticks;
209 mtx_unlock_spin(&callout_lock);
210
211 /*
212 * sched_swi acquires sched_lock, so we don't want to call it with
212 * swi_sched acquires sched_lock, so we don't want to call it with
213 * callout_lock held; incorrect locking order.
214 */
215 if (need_softclock)
213 * callout_lock held; incorrect locking order.
214 */
215 if (need_softclock)
216 sched_swi(softclock_ih, SWI_NOSWITCH);
216 swi_sched(softclock_ih, SWI_NOSWITCH);
217}
218
219/*
220 * Compute number of ticks in the specified amount of time.
221 */
222int
223tvtohz(tv)
224 struct timeval *tv;

--- 236 unchanged lines hidden ---
217}
218
219/*
220 * Compute number of ticks in the specified amount of time.
221 */
222int
223tvtohz(tv)
224 struct timeval *tv;

--- 236 unchanged lines hidden ---