Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_trap.c
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/pmckern.h> | #include <sys/pmckern.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/ktr.h> | #include <sys/ktr.h> | ||||
#include <sys/pioctl.h> | #include <sys/pioctl.h> | ||||
#include <sys/ptrace.h> | #include <sys/ptrace.h> | ||||
#include <sys/racct.h> | |||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#include <sys/syscallsubr.h> | #include <sys/syscallsubr.h> | ||||
#include <sys/sysent.h> | #include <sys/sysent.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | KASSERT((td->td_flags & TDF_SBDRY) == 0, | ||||
("userret: Returning with stop signals deferred")); | ("userret: Returning with stop signals deferred")); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
/* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ | /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ | ||||
VNET_ASSERT(curvnet == NULL, | VNET_ASSERT(curvnet == NULL, | ||||
("%s: Returning on td %p (pid %d, %s) with vnet %p set in %s", | ("%s: Returning on td %p (pid %d, %s) with vnet %p set in %s", | ||||
__func__, td, p->p_pid, td->td_name, curvnet, | __func__, td, p->p_pid, td->td_name, curvnet, | ||||
(td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); | (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); | ||||
#endif | #endif | ||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | |||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
while (p->p_throttled == 1) | while (p->p_throttled == 1) | ||||
msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); | msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
} | |||||
#endif | #endif | ||||
} | } | ||||
/* | /* | ||||
* Process an asynchronous software trap. | * Process an asynchronous software trap. | ||||
* This is relatively easy. | * This is relatively easy. | ||||
* This function will return with preemption disabled. | * This function will return with preemption disabled. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |