dvb_ringbuffer_write_user(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 to struct dvb_ringbuffer, the ring buffer main character herself πŸ‘‘
  • buf β€” pointer to the buffer where the data will be read from
  • len β€” bytes from ring buffer into buf

πŸ’– 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:


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