Re: [PATCH 4/4] client: fix bug with display->reader_count < 0

2014-09-04 Thread Pekka Paalanen
On Fri, 29 Aug 2014 11:21:31 +0200 Marek Chalupa wrote: > If we will try call wl_display_read_events() again, > after we got EAGAIN from previous call, we get deadlock > as shown in test. The bug works like this: after first call > to wl_display_read_events() the display->reader_count is 0 > and

[PATCH 4/4] client: fix bug with display->reader_count < 0

2014-08-29 Thread Marek Chalupa
If we will try call wl_display_read_events() again, after we got EAGAIN from previous call, we get deadlock as shown in test. The bug works like this: after first call to wl_display_read_events() the display->reader_count is 0 and next call will decrease it to -1 so the thread will make sleeping it