Deleted Added
full compact
kern_timeout.c (200510) kern_timeout.c (209059)
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_timeout.c 200510 2009-12-14 12:23:46Z luigi $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_timeout.c 209059 2010-06-11 18:46:34Z jhb $");
39
40#include "opt_kdtrace.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/bus.h>
45#include <sys/callout.h>
46#include <sys/condvar.h>

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

223#endif
224
225 cc = CC_CPU(timeout_cpu);
226 if (swi_add(&clk_intr_event, "clock", softclock, cc, SWI_CLOCK,
227 INTR_MPSAFE, &softclock_ih))
228 panic("died while creating standard software ithreads");
229 cc->cc_cookie = softclock_ih;
230#ifdef SMP
39
40#include "opt_kdtrace.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/bus.h>
45#include <sys/callout.h>
46#include <sys/condvar.h>

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

223#endif
224
225 cc = CC_CPU(timeout_cpu);
226 if (swi_add(&clk_intr_event, "clock", softclock, cc, SWI_CLOCK,
227 INTR_MPSAFE, &softclock_ih))
228 panic("died while creating standard software ithreads");
229 cc->cc_cookie = softclock_ih;
230#ifdef SMP
231 for (cpu = 0; cpu <= mp_maxid; cpu++) {
231 CPU_FOREACH(cpu) {
232 if (cpu == timeout_cpu)
233 continue;
232 if (cpu == timeout_cpu)
233 continue;
234 if (CPU_ABSENT(cpu))
235 continue;
236 cc = CC_CPU(cpu);
237 if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK,
238 INTR_MPSAFE, &cc->cc_cookie))
239 panic("died while creating standard software ithreads");
240 cc->cc_callout = NULL; /* Only cpu0 handles timeout(). */
241 cc->cc_callwheel = malloc(
242 sizeof(struct callout_tailq) * callwheelsize, M_CALLOUT,
243 M_WAITOK);

--- 661 unchanged lines hidden ---
234 cc = CC_CPU(cpu);
235 if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK,
236 INTR_MPSAFE, &cc->cc_cookie))
237 panic("died while creating standard software ithreads");
238 cc->cc_callout = NULL; /* Only cpu0 handles timeout(). */
239 cc->cc_callwheel = malloc(
240 sizeof(struct callout_tailq) * callwheelsize, M_CALLOUT,
241 M_WAITOK);

--- 661 unchanged lines hidden ---