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

Function ttydisc_getc

freebsd/kern/tty_ttydisc.c:1194–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1192}
1193
1194size_t
1195ttydisc_getc(struct tty *tp, void *buf, size_t len)
1196{
1197
1198 tty_assert_locked(tp);
1199
1200 if (tp->t_flags & TF_STOPPED)
1201 return (0);
1202
1203 if (ttyhook_hashook(tp, getc_inject))
1204 return ttyhook_getc_inject(tp, buf, len);
1205
1206 len = ttyoutq_read(&tp->t_outq, buf, len);
1207
1208 if (ttyhook_hashook(tp, getc_capture))
1209 ttyhook_getc_capture(tp, buf, len);
1210
1211 ttydisc_wakeup_watermark(tp);
1212 atomic_add_long(&tty_nout, len);
1213
1214 return (len);
1215}
1216
1217int
1218ttydisc_getc_uio(struct tty *tp, struct uio *uio)

Callers 2

ttydisc_getc_uioFunction · 0.85
termtty_outwakeupFunction · 0.85

Calls 5

ttyhook_getc_injectFunction · 0.85
ttyoutq_readFunction · 0.85
ttyhook_getc_captureFunction · 0.85
ttydisc_wakeup_watermarkFunction · 0.85
atomic_add_longFunction · 0.85

Tested by

no test coverage detected