From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: How should we deal with multiple concurrent user of the chrdev file?
Date: Thu, 15 Dec 2011 13:30:37 +0100 [thread overview]
Message-ID: <4EE9E86D.9020002@metafoo.de> (raw)
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
reply other threads:[~2011-12-15 12:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE9E86D.9020002@metafoo.de \
--to=lars@metafoo.de \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).