lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] timeouts in multi-threaded implementation.


From: David Ryan
Subject: [lwip-users] timeouts in multi-threaded implementation.
Date: Thu, 24 Apr 2003 17:17:12 +1000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826


Hi all..

Something I touched on a while ago was the issue of timeouts in a multi-threaded implementation. Looking at the code there doesn't seem to be a good reason to always call sys_mbox_fetch rather than sys_arch_mbox_fetch... and similarly sys_sem_wait over sys_arch_sem_wait.

For instance the main tcpip thread in an API based implementation should easily be able to handle any of the main timeouts by calling the sys_mbox_fetch as it does now. Is it neccessary to call sys_mbox_fetch on threads that are calling socket functions using threads external to the application? Before I change the calls in my code, I'm curious to know if I'm missing something here?

If these calls to sys_mbox_fetch in the api_lib.c code do not need to call or handle timeouts I'd rather not have it call sys_mbox_fetch.

The same applies to the mem.c, memp.c, and pbuf.c use of sys_sem_wait. I would rather they call sys_arch_sem_wait directly than handle timeouts in areas of the code which I know can be handled sufficiently by the tcpip thread. Could these mutexes be replaced with sys_arch_protect instead?

Does this make sense, or does checking these timeouts take precendance over everything else?

Thanks,
David.









reply via email to

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