hvc_iucv_queue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ hvc_iucv_queue β€” the kernel API manual, but make it cute πŸŽ€

okay bestie, so this one's from the Kernel API Manual section (hvc_iucv_queue(9) β€” that's the section 9 one, kernel internals, iykyk) and it's literally about buffering terminal data so it can go out later. very "just put it in the queue and trust the process" energy fr fr πŸ’…


✨ NAME ✨

hvc_iucv_queue β€” buffer terminal data for sending. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

ssize_t hvc_iucv_queue (struct hvc_iucv_private *priv , const u8 *buf ,
size_t count );

look at her. three args, one return type, zero drama. icon behavior honestly ⭐


πŸ’– ARGUMENTS πŸ’–

  • priv β€” a pointer to a struct hvc_iucv_private instance. like, the specific private struct we're doing all this for 🫢
  • buf β€” the buffer that's holding the data you wanna send. the goods, basically πŸ“
  • count β€” the size of that buffer, aka how much data you're sending. she's the amount AND the size, multitasking queen πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so what actually happens? the function queues data for sending β€” like, it puts it in the send line but doesn't personally escort it out the door. to actually send the buffered data, a work queue function gets scheduled, and it does that with QUEUE_SNDBUF_DELAY. and the function returns the number of data bytes that has been buffered. so like, "here's how much I took, bestie" πŸ’…

now for the vibe check on the return values, because these matter 😭:

  • if the device is not connected, the data is simply ignored and the function returns count. yes, your data got ghosted, but the count still comes back πŸ™ˆ
  • if the buffer is full, the function returns 0. no room, no bytes, no cap πŸ’€
  • if an existing IUCV communicaton path has been severed, you get -EPIPE back. and ooh, that one's got a purpose β€” it can be passed to the HVC layer to cause a tty hangup. so it's not just an error, it's a signal πŸ”₯
ok but fr fr, keep an eye on that severed-path case β€” it's the one with consequences, and it's meant to travel up to the HVC layer to trigger the hangup. not just a random sad number 🌈

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file lives at ./drivers/tty/hvc/hvc_iucv.c and honestly the whole friend group is here, so let's give them all their moment πŸ’œ


and that's the whole page, bestie, no notes ✨ no skips, no summarizing, we read the WHOLE thing πŸ“š

cute little sign-off: this one's from ./drivers/tty/hvc (that's the source, mwah πŸ’‹), dated October 2026, and it's the hvc_iucv_queue(9) page. periodt. πŸŽ€πŸ’–πŸŒˆ

πŸ“¦ where this page comes from