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