vb2_queue_is_busy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to struct vb2_queue with 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's has an owner AND owner 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 πŸ’œ


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