scroll_engine: Fix FS#12894: Text scrolling stops working after a few seconds/minutes

Since commit 706b920 a timeout of TIMEOUT_BLOCK (-1) will cause
queue_event_w_tmo() block indefinitely (previously it behaved as
TIMEOUT_NOBLOCK).  scroll_process_message() can be called with negative
timeouts, with luck also -1.

To fix this convert all negative timeouts to TIMEOUT_NOBLOCK explicitely.

Change-Id: I1fc20d93acbba50d713c8364f635365930b38cbf
This commit is contained in:
Thomas Martitz 2014-01-12 21:29:55 +01:00
parent 09e655f89d
commit eafc7012da

View file

@ -79,6 +79,10 @@ static bool scroll_process_message(int delay)
{
struct queue_event ev;
/* just poll once for negative delays */
if (delay < 0)
delay = TIMEOUT_NOBLOCK;
do
{
long tick = current_tick;
@ -199,4 +203,3 @@ void scroll_init(void)
IF_PRIO(, PRIORITY_USER_INTERFACE)
IF_COP(, CPU));
}