| 1496 | } |
| 1497 | |
| 1498 | static int |
| 1499 | thread_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. |
no test coverage detected