Re: read buffer

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

 



On Tue, Aug 20, 2019 at 6:36 PM Grim, Dennis <Dennis.Grim@xxxxxxxxxx> wrote:
>
> In user space, how is it known that data is available in a buffer (i.e. /dev/iio:device0)?  The buffer trigger happens on a separate thread.  I would like to do this without polling.  I have tried select() but it does not seem to see new data from iio_push_to_buffers.

Hi Dennis,

What's wrong with just a read(), which will block until data is
available? You can put it in it's own thread if you have other stuff
to do. select() will work, it's a little more complex to setup
correctly, and isn't really needed unless you are waiting on multiple
fd's

-Paul




[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