trap.c (67365) | trap.c (68808) |
---|---|
1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 | 1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 |
38 * $FreeBSD: head/sys/amd64/amd64/trap.c 67365 2000-10-20 07:58:15Z jhb $ | 38 * $FreeBSD: head/sys/amd64/amd64/trap.c 68808 2000-11-16 02:16:44Z jhb $ |
39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_cpu.h" 46#include "opt_ddb.h" --- 140 unchanged lines hidden (view full) --- 187 * Since we are curproc, clock will normally just change 188 * our priority without moving us from one queue to another 189 * (since the running process is not on a queue.) 190 * If that happened after we setrunqueue ourselves but before we 191 * mi_switch()'ed, we might not be on the queue indicated by 192 * our priority. 193 */ 194 s = splhigh(); | 39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_cpu.h" 46#include "opt_ddb.h" --- 140 unchanged lines hidden (view full) --- 187 * Since we are curproc, clock will normally just change 188 * our priority without moving us from one queue to another 189 * (since the running process is not on a queue.) 190 * If that happened after we setrunqueue ourselves but before we 191 * mi_switch()'ed, we might not be on the queue indicated by 192 * our priority. 193 */ 194 s = splhigh(); |
195 DROP_GIANT_NOSWITCH(); |
|
195 mtx_enter(&sched_lock, MTX_SPIN); 196 setrunqueue(p); 197 p->p_stats->p_ru.ru_nivcsw++; 198 mi_switch(); 199 mtx_exit(&sched_lock, MTX_SPIN); | 196 mtx_enter(&sched_lock, MTX_SPIN); 197 setrunqueue(p); 198 p->p_stats->p_ru.ru_nivcsw++; 199 mi_switch(); 200 mtx_exit(&sched_lock, MTX_SPIN); |
201 PICKUP_GIANT(); |
|
200 splx(s); 201 while ((sig = CURSIG(p)) != 0) { 202 if (have_giant == 0) { 203 mtx_enter(&Giant, MTX_DEF); 204 have_giant = 1; 205 } 206 postsig(sig); 207 } --- 1084 unchanged lines hidden --- | 202 splx(s); 203 while ((sig = CURSIG(p)) != 0) { 204 if (have_giant == 0) { 205 mtx_enter(&Giant, MTX_DEF); 206 have_giant = 1; 207 } 208 postsig(sig); 209 } --- 1084 unchanged lines hidden --- |