dvb_ringbuffer_write_user(9)
π« dvb_ringbuffer_write_user β the "write stuff from userspace" one (kernel API manual, bestie) π«
Okay so first of all, hi, welcome to the dvb_ringbuffer_write_user(9) page β this is the kernel API manual version, and we are literally about to make ring buffers make sense. π«Ά
πΈ NAME πΈ
dvb_ringbuffer_write_user β writes a buffer that came in via a user pointer, no cap π
β¨ SYNOPSIS β¨
ssize_t dvb_ringbuffer_write_user (struct dvb_ringbuffer *rbuf , const
u8 __user *buf , size_t len );
Look at her. Iconic signature. We'll walk through it, don't worry. π
π¦ ARGUMENTS π¦
rbufβ pointer tostruct dvb_ringbuffer, the ring buffer main character herself πbufβ pointer to the buffer where the data will be read fromlenβ bytes from ring buffer intobuf
π DESCRIPTION π
This variant is the userspace one, okay? The way it works is it assumes that the buffer is memory up in userspace. So, internally, it's gonna call copy_from_user. That's the whole vibe β user memory in, ring buffer gets fed, slay. π₯
π RETURN π
It gives you the number of bytes transferred β or -EFAULT if the copy flopped π. That's it, that's the return value.
π SEE ALSO π
The whole friend group, fr fr β all of these live in the kernel file ./include/media/dvb_ringbuffer.h:
struct dvb_ringbuffer(9)dvb_ringbuffer_init(9)dvb_ringbuffer_empty(9)dvb_ringbuffer_free(9)dvb_ringbuffer_avail(9)dvb_ringbuffer_reset(9)dvb_ringbuffer_flush(9)dvb_ringbuffer_flush_spinlock_wakeup(9)DVB_RINGBUFFER_PEEK(9)DVB_RINGBUFFER_SKIP(9)dvb_ringbuffer_read_user(9)dvb_ringbuffer_read(9)DVB_RINGBUFFER_WRITE_BYTE(9)dvb_ringbuffer_write(9)dvb_ringbuffer_pkt_write(9)dvb_ringbuffer_pkt_read_user(9)dvb_ringbuffer_pkt_read(9)dvb_ringbuffer_pkt_dispose(9)dvb_ringbuffer_pkt_next(9)
Quick vibe check bestie: this one is specifically for when your data is chillin' in userspace memory β that's why it does the copy_from_user thing internally. Don't come at it with a kernel pointer and expect the same energy. π
Okay that's the whole page, you ate that. π
This lil' cutie is from the ./include/media corner of the tree, and the page is dated October 2026. Byeee, go write some ring buffers π¦β¨
π¦ 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