subr_syscall.c (104303) | subr_syscall.c (104306) |
---|---|
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/kern/subr_trap.c 104303 2002-10-01 15:49:32Z jhb $ | 38 * $FreeBSD: head/sys/kern/subr_trap.c 104306 2002-10-01 17:15:53Z jmallett $ |
39 */ 40 41#ifdef __i386__ 42#include "opt_npx.h" 43#endif 44 45#include <sys/param.h> 46#include <sys/bus.h> 47#include <sys/kernel.h> 48#include <sys/lock.h> 49#include <sys/mutex.h> 50#include <sys/proc.h> 51#include <sys/kse.h> 52#include <sys/ktr.h> 53#include <sys/resourcevar.h> 54#include <sys/signalvar.h> 55#include <sys/systm.h> 56#include <sys/vmmeter.h> | 39 */ 40 41#ifdef __i386__ 42#include "opt_npx.h" 43#endif 44 45#include <sys/param.h> 46#include <sys/bus.h> 47#include <sys/kernel.h> 48#include <sys/lock.h> 49#include <sys/mutex.h> 50#include <sys/proc.h> 51#include <sys/kse.h> 52#include <sys/ktr.h> 53#include <sys/resourcevar.h> 54#include <sys/signalvar.h> 55#include <sys/systm.h> 56#include <sys/vmmeter.h> |
57#include <sys/malloc.h> 58#include <sys/ksiginfo.h> | |
59#include <machine/cpu.h> 60#include <machine/pcb.h> 61 62/* 63 * Define the code needed before returning to user mode, for 64 * trap and syscall. 65 * 66 * MPSAFE --- 10 unchanged lines hidden (view full) --- 77 78 CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, 79 p->p_comm); 80#ifdef INVARIANTS 81 /* Check that we called signotify() enough. */ 82 mtx_lock(&Giant); 83 PROC_LOCK(p); 84 mtx_lock_spin(&sched_lock); | 57#include <machine/cpu.h> 58#include <machine/pcb.h> 59 60/* 61 * Define the code needed before returning to user mode, for 62 * trap and syscall. 63 * 64 * MPSAFE --- 10 unchanged lines hidden (view full) --- 75 76 CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, 77 p->p_comm); 78#ifdef INVARIANTS 79 /* Check that we called signotify() enough. */ 80 mtx_lock(&Giant); 81 PROC_LOCK(p); 82 mtx_lock_spin(&sched_lock); |
85 if (signal_pending(p) && ((p->p_sflag & PS_NEEDSIGCHK) == 0 || | 83 if (SIGPENDING(p) && ((p->p_sflag & PS_NEEDSIGCHK) == 0 || |
86 (td->td_kse->ke_flags & KEF_ASTPENDING) == 0)) 87 printf("failed to set signal flags properly for ast()\n"); 88 mtx_unlock_spin(&sched_lock); 89 PROC_UNLOCK(p); 90 mtx_unlock(&Giant); 91#endif 92 93 /* --- 171 unchanged lines hidden --- | 84 (td->td_kse->ke_flags & KEF_ASTPENDING) == 0)) 85 printf("failed to set signal flags properly for ast()\n"); 86 mtx_unlock_spin(&sched_lock); 87 PROC_UNLOCK(p); 88 mtx_unlock(&Giant); 89#endif 90 91 /* --- 171 unchanged lines hidden --- |