vb2_core_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vb2_core_poll πŸ’…

okay so this is a page from the Kernel API Manual, and it's about vb2_core_poll β€” which, as the name lowkey gives away, is the function that implements poll syscall() logic. yes bestie, that poll. the one where userspace goes "hey is anything ready yet πŸ‘€" and the kernel goes "hold on let me check." iconic behaviour, honestly.


✨ NAME ✨

vb2_core_poll β€” implements poll syscall() logic. that's it. that's the whole job. main character energy fr πŸŽ€


🌸 SYNOPSIS 🌸

__poll_t vb2_core_poll (struct vb2_queue *q , struct file *file ,
       poll_table *wait );

three args, one __poll_t return. no cap, that's the whole signature πŸ¦‹


🫢 ARGUMENTS 🫢

  • q β€” pointer to struct vb2_queue with the videobuf2 queue. it's the queue, bestie. the whole vibe lives in here πŸ’–
  • file β€” the struct file argument that gets passed to the poll file operation handler. yes, the same one your handler already got handed ✨
  • wait β€” the poll_table wait argument, also passed to the poll file operation handler. it's the "put me in the wait queue" little guy 🧚

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this function implements the poll file operation handler for a driver. like, that's literally what it's for 🫢

for CAPTURE queues, if a buffer is ready to be dequeued, the userspace peeps get informed that the file descriptor of a video device is available for reading. slay. somebody's got footage waiting πŸ”₯

for OUTPUT queues, if a buffer is ready to be dequeued, the file descriptor gets reported as available for writing. and that's the whole vibe check πŸ’…

the return values from this function are intended to be directly returned from the poll handler in the driver. don't get creative with them, don't remix them, just hand them straight back fr fr 😭

πŸ¦‹ SEE ALSO πŸ¦‹

buckle up, this list is long and honestly kind of iconic β€” everything here lives in the kernel file ./include/media/videobuf2-core.h:


okay that's the whole page, go touch some buffers πŸ’œ

sign-off era: this lil masterpiece comes from ./include/media, dated October 2026, and yeah β€” it's the vb2_core_poll(9) page, serving Kernel API Manual realness from top to bottom. mwah 😘 πŸŽ€βœ¨

πŸ“¦ where this page comes from