mptable.h (93017) | mptable.h (93264) |
---|---|
1/* 2 * Copyright (c) 1996, by Steve Passe 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * | 1/* 2 * Copyright (c) 1996, by Steve Passe 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/i386/include/mptable.h 93017 2002-03-23 14:27:06Z bde $ | 25 * $FreeBSD: head/sys/i386/include/mptable.h 93264 2002-03-27 05:39:23Z dillon $ |
26 */ 27 28#include "opt_cpu.h" 29#include "opt_kstack_pages.h" 30 31#ifdef SMP 32#include <machine/smptests.h> 33#else --- 2271 unchanged lines hidden (view full) --- 2305 cpu_throw(); /* doesn't return */ 2306 2307 panic("scheduler returned us to %s", __func__); 2308} 2309 2310/* 2311 * For statclock, we send an IPI to all CPU's to have them call this 2312 * function. | 26 */ 27 28#include "opt_cpu.h" 29#include "opt_kstack_pages.h" 30 31#ifdef SMP 32#include <machine/smptests.h> 33#else --- 2271 unchanged lines hidden (view full) --- 2305 cpu_throw(); /* doesn't return */ 2306 2307 panic("scheduler returned us to %s", __func__); 2308} 2309 2310/* 2311 * For statclock, we send an IPI to all CPU's to have them call this 2312 * function. |
2313 * 2314 * WARNING! unpend() will call statclock_process() directly and skip this 2315 * routine. |
|
2313 */ 2314void 2315forwarded_statclock(struct trapframe frame) 2316{ 2317 2318 mtx_lock_spin(&sched_lock); 2319 statclock_process(curthread->td_kse, TRAPF_PC(&frame), TRAPF_USERMODE(&frame)); 2320 mtx_unlock_spin(&sched_lock); --- 15 unchanged lines hidden (view full) --- 2336} 2337 2338/* 2339 * For each hardclock(), we send an IPI to all other CPU's to have them 2340 * execute this function. It would be nice to reduce contention on 2341 * sched_lock if we could simply peek at the CPU to determine the user/kernel 2342 * state and call hardclock_process() on the CPU receiving the clock interrupt 2343 * and then just use a simple IPI to handle any ast's if needed. | 2316 */ 2317void 2318forwarded_statclock(struct trapframe frame) 2319{ 2320 2321 mtx_lock_spin(&sched_lock); 2322 statclock_process(curthread->td_kse, TRAPF_PC(&frame), TRAPF_USERMODE(&frame)); 2323 mtx_unlock_spin(&sched_lock); --- 15 unchanged lines hidden (view full) --- 2339} 2340 2341/* 2342 * For each hardclock(), we send an IPI to all other CPU's to have them 2343 * execute this function. It would be nice to reduce contention on 2344 * sched_lock if we could simply peek at the CPU to determine the user/kernel 2345 * state and call hardclock_process() on the CPU receiving the clock interrupt 2346 * and then just use a simple IPI to handle any ast's if needed. |
2347 * 2348 * WARNING! unpend() will call hardclock_process() directly and skip this 2349 * routine. |
|
2344 */ 2345void 2346forwarded_hardclock(struct trapframe frame) 2347{ 2348 2349 mtx_lock_spin(&sched_lock); 2350 hardclock_process(curthread, TRAPF_USERMODE(&frame)); 2351 mtx_unlock_spin(&sched_lock); --- 84 unchanged lines hidden --- | 2350 */ 2351void 2352forwarded_hardclock(struct trapframe frame) 2353{ 2354 2355 mtx_lock_spin(&sched_lock); 2356 hardclock_process(curthread, TRAPF_USERMODE(&frame)); 2357 mtx_unlock_spin(&sched_lock); --- 84 unchanged lines hidden --- |