vb2_queue_is_busy(9)
π vb2_queue_is_busy β check if the queue is busy
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little function with big "is this seat taken?" energy and honestly it's iconic for how much drama one bool can carry π
πΈ SYNOPSIS πΈ
bool vb2_queue_is_busy (struct vb2_queue *q , struct file *file );
literally just returns a bool β yes or no, busy or not busy, no in-between, no vibes-based guessing π
π¦ ARGUMENTS π¦
qβ pointer tostruct vb2_queuewith the videobuf2 queue. this is the queue we're doing a vibe check on πfileβ the file through which the vb2 queue access is performed. like, who is trying to touch the queue rn π
β¨ DESCRIPTION β¨
so here's the tea, bestie π the queue is considered busy if it has an owner and that owner is not the file. that's it. that's the whole rule. no cap π
queue ownership is acquired and checked by some of the v4l2_ioctl_ops helpers below β those are the main character handlers doing the heavy lifting π
drivers can also use this function directly when they need to open-code ioctl handlers, for instance to add additional checks between the queue ownership test and the call to the corresponding vb2 operation π₯ so if you're hand-rolling your own handler and you want to sneak an extra check in that little gap between the ownership test and the vb2 call, this is your girl π«Ά
lowkey important: it'shas an ownerANDowner is not the fileβ both conditions, bestie. one without the other doesn't count β
π SEE ALSO π
Kernel file ./include/media/videobuf2-v4l2.h β plus this whole friend group of functions that all show up to the same party π
struct vb2_v4l2_buffer(9)vb2_find_buffer(9)vb2_querybuf(9)vb2_reqbufs(9)vb2_create_bufs(9)vb2_prepare_buf(9)vb2_qbuf(9)vb2_expbuf(9)vb2_dqbuf(9)vb2_streamon(9)vb2_streamoff(9)vb2_queue_init(9)vb2_queue_init_name(9)vb2_queue_release(9)vb2_queue_change_type(9)vb2_poll(9)vb2_video_unregister_device(9)
and that's the whole page, bestie!! π§ from ./include/media, dated October 2026 β go forth and check your queues, mwah ππ
π¦ 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