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

Function ttydisc_optimize

freebsd/kern/tty_ttydisc.c:586–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void
587ttydisc_optimize(struct tty *tp)
588{
589 tty_assert_locked(tp);
590
591 if (ttyhook_hashook(tp, rint_bypass)) {
592 tp->t_flags |= TF_BYPASS;
593 } else if (ttyhook_hashook(tp, rint)) {
594 tp->t_flags &= ~TF_BYPASS;
595 } else if (!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) &&
596 (!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) &&
597 (!CMP_FLAG(i, PARMRK) ||
598 CMP_FLAG(i, IGNPAR|IGNBRK) == (IGNPAR|IGNBRK)) &&
599 !CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) {
600 tp->t_flags |= TF_BYPASS;
601 } else {
602 tp->t_flags &= ~TF_BYPASS;
603 }
604}
605
606void
607ttydisc_modem(struct tty *tp, int open)

Callers 4

ttydisc_openFunction · 0.85
tty_generic_ioctlFunction · 0.85
ttyhook_registerFunction · 0.85
ttyhook_unregisterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected