Deleted Added
full compact
subr_syscall.c (104306) subr_syscall.c (104338)
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 104306 2002-10-01 17:15:53Z jmallett $
38 * $FreeBSD: head/sys/kern/subr_trap.c 104338 2002-10-02 02:42:38Z rwatson $
39 */
40
39 */
40
41#include "opt_mac.h"
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>
42#ifdef __i386__
43#include "opt_npx.h"
44#endif
45
46#include <sys/param.h>
47#include <sys/bus.h>
48#include <sys/kernel.h>
49#include <sys/lock.h>
50#include <sys/mac.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>

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

83 if (SIGPENDING(p) && ((p->p_sflag & PS_NEEDSIGCHK) == 0 ||
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
51#include <sys/mutex.h>
52#include <sys/proc.h>
53#include <sys/kse.h>
54#include <sys/ktr.h>
55#include <sys/resourcevar.h>
56#include <sys/signalvar.h>
57#include <sys/systm.h>
58#include <sys/vmmeter.h>

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

85 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#ifdef MAC
94 mac_thread_userret(td);
95#endif
96
91 /*
92 * XXX we cheat slightly on the locking here to avoid locking in
93 * the usual case. Setting td_priority here is essentially an
94 * incomplete workaround for not setting it properly elsewhere.
95 * Now that some interrupt handlers are threads, not setting it
96 * properly elsewhere can clobber it in the window between setting
97 * it here and returning to user mode, so don't waste time setting
98 * it perfectly here.

--- 164 unchanged lines hidden ---
97 /*
98 * XXX we cheat slightly on the locking here to avoid locking in
99 * the usual case. Setting td_priority here is essentially an
100 * incomplete workaround for not setting it properly elsewhere.
101 * Now that some interrupt handlers are threads, not setting it
102 * properly elsewhere can clobber it in the window between setting
103 * it here and returning to user mode, so don't waste time setting
104 * it perfectly here.

--- 164 unchanged lines hidden ---