[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #19573] netconn_delete treats 1ms wait as poll
From: |
Jonathan Larmour |
Subject: |
[lwip-devel] [bug #19573] netconn_delete treats 1ms wait as poll |
Date: |
Wed, 11 Apr 2007 03:17:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060513 Fedora/1.0.8-1.1.fc3.1.legacy Firefox/1.0.8 |
URL:
<http://savannah.nongnu.org/bugs/?19573>
Summary: netconn_delete treats 1ms wait as poll
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jifl
Submitted on: Wednesday 04/11/2007 at 04:17
Category: None
Severity: 2 - Minor
Item Group: Change Request
Status: Need Info
Privacy: Public
Assigned to: jifl
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I raised an issue in bug #19161 that various places in api_lib.c used 1ms
waits as if they were polls. In that bug I said I was wrong, but actually I
wasn't: netconn_delete does this twice, while trying to purge the recvmbox
and acceptmbox.
So I think we do need some form of new sys abstraction to allow a polled wait
on an mbox that returns right away if it is not available.
I suggest something along the lines of this in sys.h:
/* sys_mbox_tryfetch() returns SYS_MBOX_EMPTY if appropriate */
#define SYS_MBOX_EMPTY SYS_ARCH_TIMEOUT
#if SYS_HAS_MBOX_TRYFETCH
extern u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg);
#define sys_mbox_tryfetch(_mb,_m) \
sys_arch_mbox_tryfetch((_mb),(_m))
#else
#define sys_mbox_tryfetch(_mb,_m) \
sys_arch_mbox_fetch((_mb),(_m), 1)
#endif
with a corresponding #define in opt.h for SYS_HAS_MBOX_TRYFETCH. Initially
this will default to 0 to preserve existing behaviour for ports. Perhaps in a
while it can default to 1.
But I know there's a lot going on in this area, so I want to know if anyone
had any other plans for this function before I do something.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?19573>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #19573] netconn_delete treats 1ms wait as poll,
Jonathan Larmour <=