tty_flip_buffer_push(9)
π tty_flip_buffer_push(9) β¨
okay bestie, so this one's from the Kernel API Manual and it's literally the glow-up moment for terminal buffers. it's called tty_flip_buffer_push and no cap, it's the function that gets your buffered bytes from "sitting there" to "actually going somewhere". let's get into it π
πΈ NAME πΈ
tty_flip_buffer_push β push terminal buffers π
like, push them. that's the vibe. that's the whole job.
β¨ SYNOPSIS β¨
void tty_flip_buffer_push (struct tty_port *port );
short, sweet, returns nothing because it's a void queen β she doesn't report back, she just does π
π¦ ARGUMENTS π¦
portβ the tty port to push. that's it. that's the whole parameter list. one argument, zero drama π«Ά
π DESCRIPTION π
okay so here's the tea: what this does is queue a push of the terminal flip buffers to the line discipline. so you've got stuff sitting in the flip buffers, and this queues up the handoff to the line discipline so it can actually get dealt with. it's giving "middle manager who actually gets things done" honestly π
and the iconic part? it can be called from IRQ/atomic context. so like, you can call it from interrupt context β that's the whole reason she's built this way. slay π
now for the caveat, listen up bestie: in the event of the queue being busy for flipping, the work will be held off and retried later. so it doesn't fail, doesn't yell at you, doesn't explode β it just goes "not right now, hold my π" and tries again later. lowkey so patient of her. the work is deferred, not dropped. π§
no error return, no exit status, no signal β it's void and it handles the busy case by itself. don't go looking for a return value, there isn't one π
β SEE ALSO β
kernel file ./drivers/tty/tty_buffer.c β that's where she lives, go say hi π
and the whole friend group, in the order the page lists them:
tty_buffer_lock_exclusive(9)tty_buffer_unlock_exclusive(9)tty_buffer_space_avail(9)tty_buffer_free_all(9)tty_buffer_alloc(9)tty_buffer_free(9)tty_buffer_flush(9)__tty_buffer_request_room(9)tty_prepare_flip_string(9)tty_ldisc_receive_buf(9)flush_to_ldisc(9)tty_insert_flip_string_and_push_buffer(9)tty_buffer_init(9)tty_buffer_set_limit(9)
no fr, if you're touching tty buffers you're gonna meet all of these. it's a whole ecosystem bestie, not a solo act π
π sign-off π
this little gem comes out of the ./drivers/tty corner of the tree, dated October 2026, and it's filed under the Kernel API Manual β the tty_flip_buffer_push(9) page herself ππ
go push those buffers, bestie. you got this. π¦β¨
π¦ 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