Re: [PATCH v4 1/3] iio: add watermark logic to iio read and poll

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

 



On Wed, Mar 4, 2015 at 4:40 PM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 03/04/2015 02:55 PM, Octavian Purdila wrote:
> [...]
>>>>
>>>>    int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
>>>> @@ -944,8 +1022,18 @@ static const void *iio_demux(struct iio_buffer
>>>> *buffer,
>>>>    static int iio_push_to_buffer(struct iio_buffer *buffer, const void
>>>> *data)
>>>>    {
>>>>          const void *dataout = iio_demux(buffer, data);
>>>> +       int ret;
>>>> +
>>>> +       ret = buffer->access->store_to(buffer, dataout);
>>>> +       if (ret)
>>>> +               return ret;
>>>>
>>>> -       return buffer->access->store_to(buffer, dataout);
>>>> +       /*
>>>> +        * We can't just test for watermark to decide if we wake the
>>>> poll
>>>> queue
>>>> +        * because read may request less samples than the watermark.
>>>> +        */
>>>> +       wake_up_interruptible(&buffer->pollq);
>>>
>>>
>>>
>>> What happened to poll parameters?
>>>
>>
>> I don't understand you question, can you please elaborate?
>
>
> Previously we were calling wake_up_interruptible_poll(&r->pollq, POLLIN |
> POLLRDNORM);
>

Ah, ok, I see. I will change it use wake_up_interruptible_poll.

Although it should not make any difference for IIO right now, as we
only support POLLIN/POLLRDNORM, right?

Also, I think we need to keep using a simple wake_up_interruptible in
iio_buffer_deactivate() since we probably want to wake-up userspace
for all events in that case.
--
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