Re: Coordinating concurrent users of v4l2 devices

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



Hi Ronald,

> That's a risk of using an app that does an O_EXCL open(). Users should
> know that and adapt their scripts to handle it. Make it a big FAQ entry:
> "your recording might fail if you've got a teletext daemon running".

Well, but I _don't_ want to have exclusive access.  Please remember that
O_EXCL was a proposal from your side.

What I'm still looking for is a way to allow my application to behave non-
disruptive.  When you say the user will have to take special consideration
of the daemon or even write wrapper scripts around certain applications,
this is almost like the opposite of my intent.

I made a proposal yesterday that was not commented upon. Please allow me
to flesh it out a little more:

Basically I proposed to add an ioctl that defines begin and end of a
critical section:  The begin operation only succeeds if the caller is
the only user of the device. Any ioctl (except the crit.sect. control)
between begin and end will fail with EBUSY as soon as another user opens
the device.  The caller can then end the critical section and try again
later.  Would that be hard to implement in the driver?

PS: Don't get me wrong, I do appreciate your answers so far and I do
realize that O_EXCL is the equivalent of the current v4l1 status quo
from a driver viewpoint - however not from an application viewpoint,
because the performance of at least my app would be seriously degraded
under certain circumstances, due to the high frequency of open/close,
which was not neccessary in v4l1.

bye,
-tom





[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