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

Function tty_wakeup

freebsd/kern/tty.c:1528–1545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526}
1527
1528void
1529tty_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
1547int
1548tty_wait(struct tty *tp, struct cv *cv)

Callers 6

ttydisc_rint_doneFunction · 0.85
ttydisc_wakeup_watermarkFunction · 0.85
ttydev_closeFunction · 0.85
tty_rel_goneFunction · 0.85
tty_flushFunction · 0.85
tty_generic_ioctlFunction · 0.85

Calls 3

cv_broadcastFunction · 0.85
selwakeupFunction · 0.85
pgsigioFunction · 0.70

Tested by

no test coverage detected