subr_trap.c (284199) | subr_trap.c (284665) |
---|---|
1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * Copyright (c) 2007 The FreeBSD Foundation 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the University of Utah, and William Jolitz. --- 28 unchanged lines hidden (view full) --- 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * 41 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 42 */ 43 44#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * Copyright (c) 2007 The FreeBSD Foundation 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the University of Utah, and William Jolitz. --- 28 unchanged lines hidden (view full) --- 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * 41 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 42 */ 43 44#include <sys/cdefs.h> |
45__FBSDID("$FreeBSD: stable/10/sys/kern/subr_trap.c 284199 2015-06-10 02:04:02Z kib $"); | 45__FBSDID("$FreeBSD: stable/10/sys/kern/subr_trap.c 284665 2015-06-21 06:28:26Z trasz $"); |
46 47#include "opt_hwpmc_hooks.h" 48#include "opt_ktrace.h" 49#include "opt_kdtrace.h" 50#include "opt_sched.h" 51 52#include <sys/param.h> 53#include <sys/bus.h> 54#include <sys/capsicum.h> 55#include <sys/kernel.h> 56#include <sys/lock.h> 57#include <sys/mutex.h> 58#include <sys/pmckern.h> 59#include <sys/proc.h> 60#include <sys/ktr.h> 61#include <sys/pioctl.h> 62#include <sys/ptrace.h> | 46 47#include "opt_hwpmc_hooks.h" 48#include "opt_ktrace.h" 49#include "opt_kdtrace.h" 50#include "opt_sched.h" 51 52#include <sys/param.h> 53#include <sys/bus.h> 54#include <sys/capsicum.h> 55#include <sys/kernel.h> 56#include <sys/lock.h> 57#include <sys/mutex.h> 58#include <sys/pmckern.h> 59#include <sys/proc.h> 60#include <sys/ktr.h> 61#include <sys/pioctl.h> 62#include <sys/ptrace.h> |
63#include <sys/racct.h> |
|
63#include <sys/resourcevar.h> 64#include <sys/sched.h> 65#include <sys/signalvar.h> 66#include <sys/syscall.h> 67#include <sys/syscallsubr.h> 68#include <sys/sysent.h> 69#include <sys/systm.h> 70#include <sys/vmmeter.h> --- 101 unchanged lines hidden (view full) --- 172 ("userret: Returning with SU cleanup request not handled")); 173#ifdef VIMAGE 174 /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ 175 VNET_ASSERT(curvnet == NULL, 176 ("%s: Returning on td %p (pid %d, %s) with vnet %p set in %s", 177 __func__, td, p->p_pid, td->td_name, curvnet, 178 (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); 179#endif | 64#include <sys/resourcevar.h> 65#include <sys/sched.h> 66#include <sys/signalvar.h> 67#include <sys/syscall.h> 68#include <sys/syscallsubr.h> 69#include <sys/sysent.h> 70#include <sys/systm.h> 71#include <sys/vmmeter.h> --- 101 unchanged lines hidden (view full) --- 173 ("userret: Returning with SU cleanup request not handled")); 174#ifdef VIMAGE 175 /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ 176 VNET_ASSERT(curvnet == NULL, 177 ("%s: Returning on td %p (pid %d, %s) with vnet %p set in %s", 178 __func__, td, p->p_pid, td->td_name, curvnet, 179 (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); 180#endif |
180#ifdef RACCT 181 PROC_LOCK(p); 182 while (p->p_throttled == 1) 183 msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); 184 PROC_UNLOCK(p); | 181#ifdef RACCT 182 if (racct_enable) { 183 PROC_LOCK(p); 184 while (p->p_throttled == 1) 185 msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); 186 PROC_UNLOCK(p); 187 } |
185#endif 186} 187 188/* 189 * Process an asynchronous software trap. 190 * This is relatively easy. 191 * This function will return with preemption disabled. 192 */ --- 118 unchanged lines hidden --- | 188#endif 189} 190 191/* 192 * Process an asynchronous software trap. 193 * This is relatively easy. 194 * This function will return with preemption disabled. 195 */ --- 118 unchanged lines hidden --- |