| 1196 | } |
| 1197 | |
| 1198 | void |
| 1199 | tty_rel_gone(struct tty *tp) |
| 1200 | { |
| 1201 | |
| 1202 | tty_assert_locked(tp); |
| 1203 | MPASS(!tty_gone(tp)); |
| 1204 | |
| 1205 | /* Simulate carrier removal. */ |
| 1206 | ttydisc_modem(tp, 0); |
| 1207 | |
| 1208 | /* Wake up all blocked threads. */ |
| 1209 | tty_wakeup(tp, FREAD|FWRITE); |
| 1210 | cv_broadcast(&tp->t_bgwait); |
| 1211 | cv_broadcast(&tp->t_dcdwait); |
| 1212 | |
| 1213 | tp->t_flags |= TF_GONE; |
| 1214 | tty_rel_free(tp); |
| 1215 | } |
| 1216 | |
| 1217 | static int |
| 1218 | tty_drop_ctty(struct tty *tp, struct proc *p) |
no test coverage detected