[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] next_timeout not working correctly

From: Carlos Galindo
Subject: [lwip-devel] next_timeout not working correctly
Date: Thu, 30 Oct 2014 08:40:20 -0700 (MST)

Dear all,
I am a rookie here but I think it is interesting to comment a problem that I
have already found while implementing the lwip.

My problem was that once initialized the stack with the function
tcpip_init(), my system does not attend any other task with lower priority
than the lwip. It was due to the first timeout in the next_timeout variable
has a the parameter time = 0, thus, the sys_timeouts_mbox_fetch() in the
tcpip_thread never blocks the lwip.

The reason of getting time equal to 0 in next_timeout variable was that
sys_timeout() trusts that when next_timeout has no timeout allocated, the
value is NULL. Problem is that in my system creating a pointer to struct it
does not iniate it as NULL.

My proposal to prevent that is changing the variable declaration from:

static struct sys_timeo *next_timeout;


static struct sys_timeo *next_timeout = NULL;

Does it makes sense to you?

Best regards,

View this message in context: 
Sent from the lwip-devel mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]