Hi all.

I'm working on an embedded system using lwip. This system has to work
forever without blocks.
I'm using lwip on multitask enviroment (FreeRTOS)

I implemented a HW watchdog on my board which can reset the board if
microcontroller doesn't kick it in few second.
I implemented in my code a simple watch dog manager, which does kick only if
ALL tasks set periodically a flag.

LWIP has its task (tcpip thread - i'm using socket), and i saw that this
task can block forever trought functions in sys_arch.c sys_arch_sem_wait and
sys_arch_mbox_fetch.
I implemented these functions putting a macro functions inside a infinite
loop (execute if timeout parameter is 0).

I decided that the implementation for this macro function, caoul be:

- get current task handle (using rtos api function)
- set its flag in watchdog manager searching its handle in a table


Do you think could it be a good solution???


Thanks,
Piero
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to