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

Function pts_kqops_read_event

freebsd/kern/tty_pts.c:457–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457static int
458pts_kqops_read_event(struct knote *kn, long hint)
459{
460 struct file *fp = kn->kn_fp;
461 struct tty *tp = fp->f_data;
462 struct pts_softc *psc = tty_softc(tp);
463
464 if (psc->pts_flags & PTS_FINISHED) {
465 kn->kn_flags |= EV_EOF;
466 return (1);
467 } else {
468 kn->kn_data = ttydisc_getc_poll(tp);
469 return (kn->kn_data > 0);
470 }
471}
472
473static void
474pts_kqops_write_detach(struct knote *kn)

Callers

nothing calls this directly

Calls 1

ttydisc_getc_pollFunction · 0.85

Tested by

no test coverage detected