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 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 |
231 CPU_FOREACH(cpu) { |
232 if (cpu == timeout_cpu) 233 continue; |
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 --- |