n_tty_set_termios(9)
π n_tty_set_termios(9) β like, the kernel API manual bestie π
okay so welcome to the glow-up era of n_tty_set_termios, a function that lives in the <rainbow>Kernel API Manual</rainbow> (section 9, iykyk) and honestly? she's lowkey the moment.
β¨ NAME β¨
n_tty_set_termios β termios data changed</p> π« (yes that's the whole vibe: something in termios shifted and we're all reacting to it)
π¦ SYNOPSIS π¦
void n_tty_set_termios (struct tty_struct *tty , const struct ktermios
*old );
that's the whole signature, no cap. two things go in, nothing comes back (void, she gives nothing and that's the point π).
πΈ ARGUMENTS πΈ
ttyβ the terminal, bestie. the actualstruct tty_structwe're doing all this for π₯οΈoldβ the previous data. like the termios from before, so we can be nosy about what changed π
π§ DESCRIPTION π§
so here's the tea π: the tty layer calls this bad boy whenever the user changes the termios flags, so the line discipline can plan ahead. iconic foresight, truly main character energy.
big important facts, do NOT skip these:
- this function cannot sleep π΄π« β literally not allowed, not even a lil nap
- it is protected from re-entry by the tty layer π β no barging in twice
- the user is guaranteed that this function will not be re-entered or be in progress when the ldisc is closed β
Locking: the caller holds tty->termios_rwsem π β that's the rule, hold the sem, no drama.
π SEE ALSO π
the whole friend group, fr fr β plus the kernel file ./drivers/tty/n_tty.c:
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_overrun(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_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 every single one, I counted, slay π₯
and that's the page!! π«Ά source/version vibes: she ships from ./drivers/tty, dated October 2026, and she's filed under n_tty_set_termios(9) in the Kernel API Manual. periodt. π
π¦ 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