bio: speedup response_thread termination

This commit is contained in:
Thomas Schoebel-Theuer 2017-01-19 08:59:17 +01:00
parent ccf3c1b944
commit b17944a512

View File

@ -558,7 +558,11 @@ int bio_response_thread(void *data)
#endif
wait_event_interruptible_timeout(
brick->response_event,
atomic_read(&brick->completed_count) > 0,
atomic_read(&brick->completed_count) > 0 ||
(brick_thread_should_stop() &&
atomic_read(&brick->fly_count[0]) +
atomic_read(&brick->fly_count[1]) +
atomic_read(&brick->fly_count[2]) <= 0),
sleeptime);
MARS_IO("%d woken up, completed_count = %d fly_count[0] = %d fly_count[1] = %d fly_count[2] = %d\n",