[PATCH] drm: fix drm_read() returning 0

2012-07-20 Thread Dave Airlie
On Fri, Jun 15, 2012 at 6:21 AM, David Herrmann wrote: > Imagine two threads read()'ing on the drm file and both are asleep waiting > for events in drm_read(). If a single event occurs, both threads are woken > up and start fetching the event. One thread will get it and return, the > other thread

Re: [PATCH] drm: fix drm_read() returning 0

2012-07-19 Thread Dave Airlie
On Fri, Jun 15, 2012 at 6:21 AM, David Herrmann dh.herrm...@googlemail.com wrote: Imagine two threads read()'ing on the drm file and both are asleep waiting for events in drm_read(). If a single event occurs, both threads are woken up and start fetching the event. One thread will get it and

[PATCH] drm: fix drm_read() returning 0

2012-06-14 Thread David Herrmann
Imagine two threads read()'ing on the drm file and both are asleep waiting for events in drm_read(). If a single event occurs, both threads are woken up and start fetching the event. One thread will get it and return, the other thread will notice that there is no further event and return 0 to

[PATCH] drm: fix drm_read() returning 0

2012-06-14 Thread David Herrmann
Imagine two threads read()'ing on the drm file and both are asleep waiting for events in drm_read(). If a single event occurs, both threads are woken up and start fetching the event. One thread will get it and return, the other thread will notice that there is no further event and return 0 to