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

Function ttydisc_close

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

Source from the content-addressed store, hash-verified

101}
102
103void ttydisc_close(struct lwp_tty *tp)
104{
105 /* Clean up our flags when leaving the discipline. */
106 tp->t_flags &= ~(TF_STOPPED | TF_HIWAT | TF_ZOMBIE);
107 tp->t_termios.c_lflag &= ~FLUSHO;
108
109 /*
110 * POSIX states that we must drain output and flush input on
111 * last close. Draining has already been done if possible.
112 */
113 tty_flush(tp, FREAD | FWRITE);
114
115#ifdef USING_BSD_HOOK
116 if (ttyhook_hashook(tp, close))
117 ttyhook_close(tp);
118#endif
119}
120
121static int ttydisc_read_canonical(struct lwp_tty *tp, struct uio *uio,
122 int ioflag)

Callers 1

ttydev_leaveFunction · 0.85

Calls 1

tty_flushFunction · 0.85

Tested by

no test coverage detected