MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ttydisc_optimize

Function ttydisc_optimize

components/lwp/terminal/freebsd/tty_ttydisc.c:621–645  ·  view source on GitHub ↗

set optimize flags if possible */

Source from the content-addressed store, hash-verified

619
620/* set optimize flags if possible */
621void ttydisc_optimize(struct lwp_tty *tp)
622{
623 tty_assert_locked(tp);
624
625 if (ttyhook_hashook(tp, rint_bypass))
626 {
627 tp->t_flags |= TF_BYPASS;
628 }
629 else if (ttyhook_hashook(tp, rint))
630 {
631 tp->t_flags &= ~TF_BYPASS;
632 }
633 else if (!CMP_FLAG(i, ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON) &&
634 (!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) &&
635 (!CMP_FLAG(i, PARMRK) ||
636 CMP_FLAG(i, IGNPAR | IGNBRK) == (IGNPAR | IGNBRK)) &&
637 !CMP_FLAG(l, ECHO | ICANON | IEXTEN | ISIG | PENDIN))
638 {
639 tp->t_flags |= TF_BYPASS;
640 }
641 else
642 {
643 tp->t_flags &= ~TF_BYPASS;
644 }
645}
646
647void ttydisc_modem(struct lwp_tty *tp, int open)
648{

Callers 2

ttydisc_openFunction · 0.85
tty_generic_ioctlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected