n_tty_receive_overrun(9)
π n_tty_receive_overrun(9) β a Kernel API Manual moment
okay bestie, so this one lives in the Kernel API Manual and it's called n_tty_receive_overrun, and honestly? it's giving "the cleanup crew of the tty world." let's get into it β¨
πΈ NAME πΈ
n_tty_receive_overrun β handle overrun reporting π«Ά
β¨ SYNOPSIS β¨
void n_tty_receive_overrun (const struct tty_struct *tty );
that's it. one function, one arg, zero drama. iconic.
π ARGUMENTS π
ttyβ the terminal π» (that's literally what it is, no cap)
π¦ DESCRIPTION π¦
okay so picture this: data arrived faster than we could process it. the tty driver has already flagged that this happened, but β and this is the heartbreaking part β the bits that were missed are gone forever. π not "recoverable later," not "in a buffer somewhere," just poof. bestie, they're not coming back.
this function gets called from the receive_buf path, which means it's single threaded β so it's lowkey chilling, it does not need locking, because num_overrun and overrun_time are function private. nobody else is touching them, so we don't have to fight over them. slay. π
tl;dr: overrun happened, the data's gone, we report it, we move on. main character energy. π
π₯ SEE ALSO π₯
- Kernel file
./drivers/tty/n_tty.cβ and while you're there, the whole friend group: n_tty_kick_worker(9)n_tty_write_wakeup(9)put_tty_queue(9)reset_buffer_flags(9)n_tty_flush_buffer(9)is_utf8_continuation(9)is_continuation(9)do_output_char(9)process_output(9)process_output_block(9)__process_echoes(9)add_echo_byte(9)echo_move_back_col(9)echo_set_canon_col(9)echo_erase_tab(9)echo_char_raw(9)echo_char(9)finish_erasing(9)eraser(9)isig(9)n_tty_receive_break(9)n_tty_receive_parity_error(9)n_tty_receive_char_flow_ctrl(9)n_tty_receive_char(9)n_tty_receive_buf_common(9)n_tty_set_termios(9)n_tty_close(9)n_tty_open(9)copy_from_read_buf(9)canon_copy_from_read_buf(9)job_control(9)n_tty_read(9)n_tty_write(9)n_tty_poll(9)n_tty_inherit_ops(9)
that's the whole group chat, fr fr. go read them all, iykyk π§π
gentle reminder bestie: once those bits are missed, they are missed. there is no undo. guard your throughput accordingly π
and that's the whole page! this lil cutie came from ./drivers/tty, dated October 2026 ππ¦ mwah, go read the source, ily, bye! πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms