Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_trap.c
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | |||||
#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 && p->p_throttled == 1) { | if (racct_enable && p->p_throttled != 0) { | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
while (p->p_throttled == 1) | while (p->p_throttled != 0) { | ||||
msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); | msleep(p->p_racct, &p->p_mtx, 0, "racct", | ||||
p->p_throttled < 0 ? 0 : p->p_throttled); | |||||
if (p->p_throttled > 0) | |||||
p->p_throttled = 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. | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |