MCPcopy Create free account
hub / github.com/F-Stack/f-stack / thread_stopped

Function thread_stopped

freebsd/kern/kern_sig.c:3054–3073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3052}
3053
3054void
3055thread_stopped(struct proc *p)
3056{
3057 int n;
3058
3059 PROC_LOCK_ASSERT(p, MA_OWNED);
3060 PROC_SLOCK_ASSERT(p, MA_OWNED);
3061 n = p->p_suspcount;
3062 if (p == curproc)
3063 n++;
3064 if ((p->p_flag & P_STOPPED_SIG) && (n == p->p_numthreads)) {
3065 PROC_SUNLOCK(p);
3066 p->p_flag &= ~P_WAITED;
3067 PROC_LOCK(p->p_pptr);
3068 childproc_stopped(p, (p->p_flag & P_TRACED) ?
3069 CLD_TRAPPED : CLD_STOPPED);
3070 PROC_UNLOCK(p->p_pptr);
3071 PROC_SLOCK(p);
3072 }
3073}
3074
3075/*
3076 * Take the action for the specified signal

Callers 4

tdsendsignalFunction · 0.85
thread_suspend_checkFunction · 0.85
thread_suspend_switchFunction · 0.85
kern_thr_exitFunction · 0.85

Calls 1

childproc_stoppedFunction · 0.85

Tested by

no test coverage detected