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

Function thread_suspend_one

freebsd/kern/kern_thread.c:1483–1496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1481}
1482
1483void
1484thread_suspend_one(struct thread *td)
1485{
1486 struct proc *p;
1487
1488 p = td->td_proc;
1489 PROC_SLOCK_ASSERT(p, MA_OWNED);
1490 THREAD_LOCK_ASSERT(td, MA_OWNED);
1491 KASSERT(!TD_IS_SUSPENDED(td), ("already suspended"));
1492 p->p_suspcount++;
1493 td->td_flags &= ~TDF_NEEDSUSPCHK;
1494 TD_SET_SUSPENDED(td);
1495 sched_sleep(td, 0);
1496}
1497
1498static int
1499thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary)

Callers 3

sig_suspend_threadsFunction · 0.85
weed_inhibFunction · 0.85
thread_suspend_checkFunction · 0.85

Calls 1

sched_sleepFunction · 0.70

Tested by

no test coverage detected