How should we deal with multiple concurrent user of the chrdev file?

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux