| 1526 | } |
| 1527 | |
| 1528 | void |
| 1529 | tty_wakeup(struct tty *tp, int flags) |
| 1530 | { |
| 1531 | |
| 1532 | if (tp->t_flags & TF_ASYNC && tp->t_sigio != NULL) |
| 1533 | pgsigio(&tp->t_sigio, SIGIO, (tp->t_session != NULL)); |
| 1534 | |
| 1535 | if (flags & FWRITE) { |
| 1536 | cv_broadcast(&tp->t_outwait); |
| 1537 | selwakeup(&tp->t_outpoll); |
| 1538 | KNOTE_LOCKED(&tp->t_outpoll.si_note, 0); |
| 1539 | } |
| 1540 | if (flags & FREAD) { |
| 1541 | cv_broadcast(&tp->t_inwait); |
| 1542 | selwakeup(&tp->t_inpoll); |
| 1543 | KNOTE_LOCKED(&tp->t_inpoll.si_note, 0); |
| 1544 | } |
| 1545 | } |
| 1546 | |
| 1547 | int |
| 1548 | tty_wait(struct tty *tp, struct cv *cv) |
no test coverage detected