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

Function tty_kqops_read_event

freebsd/kern/tty.c:714–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712}
713
714static int
715tty_kqops_read_event(struct knote *kn, long hint __unused)
716{
717 struct tty *tp = kn->kn_hook;
718
719 tty_assert_locked(tp);
720
721 if (tty_gone(tp) || tp->t_flags & TF_ZOMBIE) {
722 kn->kn_flags |= EV_EOF;
723 return (1);
724 } else {
725 kn->kn_data = ttydisc_read_poll(tp);
726 return (kn->kn_data > 0);
727 }
728}
729
730static void
731tty_kqops_write_detach(struct knote *kn)

Callers

nothing calls this directly

Calls 1

ttydisc_read_pollFunction · 0.85

Tested by

no test coverage detected