lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] sys_mbox_fetch & sys_mbox_fetch_timeout compatible?


From: Andrew Lentvorski
Subject: [lwip-users] sys_mbox_fetch & sys_mbox_fetch_timeout compatible?
Date: Tue, 17 Apr 2007 20:42:29 -0700
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

I'm attempting to implement a true 2 thread version of simhost using the sockets interface. To do that, I need to break into the tcpip_thread loop and poll the hardware interface and then poll the message queue and then loop (currently, simhost uses at least 3 threads).

However, sys_mbox_fetch is blocking with no timeout. It looks like I need sys_mbox_fetch_timeout.

This scares me a bit.

Is sys_mbox_fetch just sys_mbox_fetch_timeout(mbox, msg, 0)? If so, why the compile switch required to change between them? Why aren't *both* functions provided? Why isn't sys_mbox_fetch implemented in terms of sys_mbox_fetch_timeout?

Can I just use sys_mbox_fetch_timeout(mbox, msg, 1) to do what I want? What are the downsides to this (other than high CPU and a 1 millisecond lag before handling the next packet)?

Thanks,
-a




reply via email to

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