lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19222] timeout in sys_mbox_fetch


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19222] timeout in sys_mbox_fetch
Date: Tue, 06 Mar 2007 21:59:34 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Follow-up Comment #6, bug #19222 (project lwip):

Hey Dimtry, "overhead" is perhaps a too big word ? :)

But, you're right, adding a parameter to a function is an overhead! I just
think the real overhead is to don't use the sys_arch_mbox_fetch's timeout
parameter, which can be based on optimized operating system calls (in my
case, pSos). 

Fetching a message from a mailbox with a timeout is simplest - but it's my
point of view - with sys_arch_mbox_fetch.

I can understand that some users (or perhaps lot of them, I don't really know
all lwip's users, and how they use lwIP?) want to use lwip's internal
features, to reduce fooprint, but most of time, sys_arch.c is a wrapper of
operating system functions, so, we can suppose that application level will
also use these operating systems calls, and not sys.h calls.

But ok, we have to found a solution which can be accept by most of users.

I propose you that (in fact, Simon already propose it, but he was the only
one to answer me when I have submit the patch...) :

- Add a sys_mbox_fetch_with_timeout, implement sys_mbox_fetch with it

- Remove any extra parameters from tcpip.c and api_lib.c (except netconn_recv
of course, which call sys_mbox_fetch_with_timeout).

- Force NULL inside sys_mbox_fetch_with_timeout when we get SYS_ARCH_TIMEOUT,
and use a "min" with 0 checking.

More, to avoid extra recv_timeout in netconn struct, I can set a define to
enable to include or not this code.

Ok for you ? Do you prefer this solution ?



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19222>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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