tests: tweak the event worker
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 16 May 2017 11:30:05 +0000 (13:30 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Tue, 16 May 2017 11:30:05 +0000 (13:30 +0200)
commitace8eef246fd977c8185240c5cf69b866071ae6f
treecc0f9907084d9ee346cc85604b22063547c16e2a
parent2c846b8d88fc142cbe02b769444b1d30d82865a7
tests: tweak the event worker

The event worker thread should only inject another line event if
pthread_cond_timedwait() returned -ETIMEDOUT. If it returned 0, then
the main thread called pthread_cond_broadcast() and either requested
the worker thread to terminate or to change the event configuration.

In both cases we should not inject an event.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/gpiod-test.c