Re: V4L2 and multithreaded applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Laurent Pinchart <laurent.pinchart@xxxxxxxxxxx> writes:

> Hi everybody,
> 
> the V4L2 API documentation doesn't state if and which ioctls are reentrant and 
> can be used by separated threads. For instance, I suppose that the 
> VIDIOC_[SG]_CTRL can be called from separated threads, but I've had troubles 
> when calling VIDIOC_QBUF when another thread was busy dequeuing buffers.
> 
> Which are the ioctls that can be called from different threads ?

This isn't specified as far I know.

Generally you can't assume that it is possible to call ioctls with the
same file handle in parallel because the driver will serialize ioctls
with a lock if needed.  The most simple approach for a driver is to
simply serialize the whole ioctl syscall ...

Whenever it actually works or not much depends on the driver
implementation.  With bttv it should have worked.  Chances are higher
with drivers which support multiple opens as these need a more
sophisticated locking model than a simple global lock anyway ...

  Gerd

-- 
You have a new virus in /var/mail/kraxel




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux