linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How should we deal with multiple concurrent user of the chrdev file?
@ 2011-12-15 12:30 Lars-Peter Clausen
  0 siblings, 0 replies; only message in thread
From: Lars-Peter Clausen @ 2011-12-15 12:30 UTC (permalink / raw)
  To: Jonathan Cameron, Hennerich, Michael, linux-iio@vger.kernel.org

Hi,

Currently it is possible to open the iio device chrdev file multiple times.
Since we only support one reader for the buffer at a time this can cause
problems. There is a busy flag for the buffer, which is cleared when the
buffer is released. But the flag is never set and never tested. I suppose
this is a left over from the merge of the event and buffer chrdevs into one.
Events btw. still implement the busy logic and you can only get one event
file descriptor at a time.

Should we add a per iio device busy flag which only allows one open file
descriptor of the iio device chrdev at a time? This has the downside that it
will no longer be possible for one application to listen to the events of
the device and for another application to read from the buffer. But I
suppose the use-case for this is rather limited anyway.

- Lars

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-15 12:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 12:30 How should we deal with multiple concurrent user of the chrdev file? Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).