tty_ldisc_receive_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tty_ldisc_receive_buf πŸ’–

okay bestie, so we're in the Kernel API Manual today and the star of the show is tty_ldisc_receive_buf β€” literally the function that forwards data to the line discipline. no cap, that's the whole vibe. πŸŽ€


✨ NAME ✨

tty_ldisc_receive_buf β€” forward data to line discipline πŸ¦‹


🌸 SYNOPSIS 🌸

size_t tty_ldisc_receive_buf (struct tty_ldisc *ld , const u8 *p , const
       const u8 *f , size_t count );

wait β€” copy that exactly, ok? the line break and all. she's precise. πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • ld β€” the line discipline that's gonna process the input. she's the one doing the work, periodt. πŸ‘‘
  • p β€” char buffer. the actual bytes, living their life. πŸ“
  • f β€” the flags buffer: TTY_NORMAL, TTY_BREAK, etc. think of it as the little mood ring for each byte. 🌈
  • count β€” number of bytes to process. how many we're serving today, no more no less. ✨

🧚 DESCRIPTION 🧚

here's the tea: if you're a caller other than flush_to_ldisc, you need to exclude the kworker from concurrent use of the line discipline. yes, really. don't let them both touch it at once, that's giving chaos energy 😭. and if you want to see how it's done properly, go look at paste_selection β€” she ate. πŸ’…

bestie pls don't skip this part. the kworker exclusion is not optional vibes, it's the whole point. πŸ™ˆ

⭐ RETURN ⭐

returns the number of bytes processed. iconic. πŸ”₯


🌟 SEE ALSO 🌟

the whole friend group, fr fr. go say hi. 🫢


k bye ily, this page came straight out of ./drivers/tty and it's dated October 2026 β€” so yes, she's from the future and she's still slaying πŸ’€βœ¨

πŸ“¦ where this page comes from