| 1481 | } |
| 1482 | |
| 1483 | void |
| 1484 | thread_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 | |
| 1498 | static int |
| 1499 | thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) |
no test coverage detected