aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r--sys/kern/subr_trap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 66e32018e04f..70df8a10895c 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -100,6 +100,9 @@ void
userret(struct thread *td, struct trapframe *frame)
{
struct proc *p = td->td_proc;
+#ifdef RACCT
+ int sig;
+#endif
CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid,
td->td_name);
@@ -163,6 +166,16 @@ userret(struct thread *td, struct trapframe *frame)
__func__, td, p->p_pid, td->td_name, curvnet,
(td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A"));
#endif
+#ifdef RACCT
+ PROC_LOCK(p);
+ while (p->p_throttled == 1) {
+ sig = msleep(p->p_racct, &p->p_mtx, PCATCH | PBDRY, "racct",
+ hz);
+ if ((sig == EINTR) || (sig == ERESTART))
+ break;
+ }
+ PROC_UNLOCK(p);
+#endif
}
/*