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

Function thread_unsuspend_one

freebsd/kern/kern_thread.c:1498–1515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1496}
1497
1498static int
1499thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary)
1500{
1501
1502 THREAD_LOCK_ASSERT(td, MA_OWNED);
1503 KASSERT(TD_IS_SUSPENDED(td), ("Thread not suspended"));
1504 TD_CLR_SUSPENDED(td);
1505 td->td_flags &= ~TDF_ALLPROCSUSP;
1506 if (td->td_proc == p) {
1507 PROC_SLOCK_ASSERT(p, MA_OWNED);
1508 p->p_suspcount--;
1509 if (boundary && (td->td_flags & TDF_BOUNDARY) != 0) {
1510 td->td_flags &= ~TDF_BOUNDARY;
1511 p->p_boundary_count--;
1512 }
1513 }
1514 return (setrunnable(td, 0));
1515}
1516
1517/*
1518 * Allow all threads blocked by single threading to continue running.

Callers 5

thread_exitFunction · 0.85
weed_inhibFunction · 0.85
thread_suspend_checkFunction · 0.85
thread_unsuspendFunction · 0.85
thread_single_endFunction · 0.85

Calls 1

setrunnableFunction · 0.85

Tested by

no test coverage detected