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

Function constty_clear

freebsd/kern/kern_cons.c:592–605  ·  view source on GitHub ↗

* Disable console redirection to a tty. */

Source from the content-addressed store, hash-verified

590 * Disable console redirection to a tty.
591 */
592void
593constty_clear(void)
594{
595 int c;
596
597 constty = NULL;
598 if (consbuf == NULL)
599 return;
600 callout_stop(&conscallout);
601 while ((c = msgbuf_getchar(&consmsgbuf)) != -1)
602 cnputc(c);
603 free(consbuf, M_TTYCONS);
604 consbuf = NULL;
605}
606
607/* Times per second to check for pending console tty messages. */
608static int constty_wakeups_per_second = 5;

Callers 3

ttydev_leaveFunction · 0.85
tty_generic_ioctlFunction · 0.85
constty_timeoutFunction · 0.85

Calls 3

msgbuf_getcharFunction · 0.85
cnputcFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected