Applied a patch from Marc Boucher which has the following changes:
1) Fixed sys_arch.txt documentation to have new return type from
sys_thread_new.
2) Removed unnecessary casts on calling sys_timeout() in certain files.
3) Removed some unnecessary break statements after return statements.
4) Changed sys_timeout_remove() to sys_untimeout().
5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c
6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().
Removed some unused .h files in coldfire port.
Support LWIP_DIAG and LWIP_ASSERT in coldfire (sort of).
Fix to last api fix to make sure select() is triggered, even when there has
been a FIN.
Allow build of unixsim from cygwin by specifying "make ARCH=cygwin" or from
linux by specifying "make ARCH=linux".
Added select() functionality to sockets library.
Support for errno in sockets library.
Byte ordering fixes.
basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support
- added additional argument to netif_add to pass state pointer so that the
if_init function has access to context information before
the interface is added, without accessing globals.
- added netif_remove()
- to conserve cpu load the tcpip_tcp_timer should only be active
when tcbs that need it exist.
- pass length of available data to callbacks for NETCONN_EVT_RCV events
- added tcpip_link_input(), a hack to allow processing of PPP
packets in tcpip_thread() context. This saves threads and context
switches.
- renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name
collision.
- changed a bunch of %d's to %u's in format strings for unsigned values.
- added ip_frag to lwip_stats.
- changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic
values.
- added sys_timeout_remove() function to cancel timeouts (needed by PPP
amongst other things).
- tolerate NULL returns from sys_arch_timeouts() since some threads might
not need to use or have timeouts.
- added sys_sem_wait_timeout()
- moved mem_malloc() function to end of mem.c to work around tasking
compiler bug.
- automatically bind to local tcp port if 0.
- allow customization of port ranges for automatic local bindings.
- corrected various typos, spelling errors, etc..
Thanks to Marc Boucher for many of these changes.
interrupts. In unixsim this is implemented by using a mutex. Uses #define
SYS_LIGHTWEIGHT_PROT to enable. It is enabled in coldfire by default, but
disabled in unixsim.
Fixes bug 2005 if you enable SYS_LIGHTWEIGHT_PROT. So the bug is closed.