device: fibers/idle task must wait when acquiring device_sync object

TICKS_NONE was mistakenly used when waiting on the nanokernerel
semaphore in the microkernel case, instead of TICKS_UNLIMITED, causing a
thread that wants to wait to return immediately, as if the device was
always ready.

Change-Id: Id2376ebef324339fec05c56655e705755a670973
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-02-09 17:42:01 -05:00 committed by Gerrit Code Review
parent 7cd4d5b9c4
commit 205d3a4265

View file

@ -235,7 +235,7 @@ static inline void device_sync_call_wait(device_sync_call_t *sync)
task_sem_take(sync->t_sem, TICKS_UNLIMITED);
} else {
sync->waiter_is_task = false;
nano_sem_take(&sync->f_sem, TICKS_NONE);
nano_sem_take(&sync->f_sem, TICKS_UNLIMITED);
}
}