Index: CHANGELOG
===================================================================
RCS file: /sources/lwip/lwip/CHANGELOG,v
retrieving revision 1.143
diff -u -0 -p -r1.143 CHANGELOG
--- CHANGELOG	22 May 2007 09:54:00 -0000	1.143
+++ CHANGELOG	22 May 2007 13:10:37 -0000
@@ -13,4 +12,0 @@ FUTURE
-    
-  * TODO: review the the sequential netconn and socket API (lwip/src/api)
-    for bugs and performance issues. Frequent system calls (e.g. sys_mbox_fetch)
-    slooow things down considerably. 


Index: src/api/api_lib.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_lib.c,v
retrieving revision 1.42
diff -u -0 -p -r1.42 api_lib.c
--- src/api/api_lib.c	22 May 2007 09:54:00 -0000	1.42
+++ src/api/api_lib.c	22 May 2007 13:14:36 -0000
@@ -446 +446 @@ netconn_accept(struct netconn *conn)
-  sys_mbox_fetch(conn->acceptmbox, (void *)&newconn);
+  sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, 0);
@@ -491 +491 @@ netconn_recv(struct netconn *conn)
-    sys_mbox_fetch(conn->recvmbox, (void *)&p);
+    sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, 0);
@@ -532 +532 @@ netconn_recv(struct netconn *conn)
-    sys_mbox_fetch_timeout(conn->recvmbox, (void *)&buf, conn->recv_timeout);
+    sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, conn->recv_timeout);
@@ -534 +534 @@ netconn_recv(struct netconn *conn)
-    sys_mbox_fetch(conn->recvmbox, (void *)&buf);
+    sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, 0);


Index: src/api/tcpip.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/tcpip.c,v
retrieving revision 1.39
diff -u -0 -p -r1.39 tcpip.c
--- src/api/tcpip.c	18 May 2007 11:27:46 -0000	1.39
+++ src/api/tcpip.c	22 May 2007 13:11:59 -0000
@@ -324 +324 @@ tcpip_apimsg(struct api_msg *apimsg)
-    sys_mbox_fetch(apimsg->msg.conn->mbox, NULL);
+    sys_arch_mbox_fetch(apimsg->msg.conn->mbox, NULL, 0);
@@ -336 +336 @@ err_t tcpip_netifapi(struct netifapi_msg
-    netifapimsg->sem = sys_sem_new(0);      
+    netifapimsg->sem = sys_sem_new(0);
@@ -340,2 +340,2 @@ err_t tcpip_netifapi(struct netifapi_msg
-    }  
-      
+    }
+    
@@ -346 +346 @@ err_t tcpip_netifapi(struct netifapi_msg
-    sys_sem_free(netifapimsg->sem);    
+    sys_sem_free(netifapimsg->sem);


Index: src/core/sys.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/sys.c,v
retrieving revision 1.24
diff -u -0 -p -r1.24 sys.c
--- src/core/sys.c	10 May 2007 14:23:38 -0000	1.24
+++ src/core/sys.c	22 May 2007 13:17:19 -0000
@@ -47,5 +47,2 @@ struct sswt_cb
-#if LWIP_SO_RCVTIMEO
-void sys_mbox_fetch_timeout(sys_mbox_t mbox, void **msg, u32_t timeout)
-#else
-void sys_mbox_fetch(sys_mbox_t mbox, void **msg)
-#endif /* LWIP_SO_RCVTIMEO */
+void
+sys_mbox_fetch(sys_mbox_t mbox, void **msg)
@@ -63,3 +59,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#if LWIP_SO_RCVTIMEO  
-    time = sys_arch_mbox_fetch(mbox, msg, timeout);
-#else
@@ -67 +60,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#endif /* LWIP_SO_RCVTIMEO */
@@ -70,3 +62,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#if LWIP_SO_RCVTIMEO  
-      time = sys_arch_mbox_fetch(mbox, msg, (timeout?((timeout<timeouts->next->time)?timeout:timeouts->next->time):timeouts->next->time));
-#else
@@ -74 +63,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#endif /* LWIP_SO_RCVTIMEO */
@@ -80,15 +68,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#if LWIP_SO_RCVTIMEO  
-      if ((timeout) && (timeout<timeouts->next->time)) {        
-      /* If time == SYS_ARCH_TIMEOUT, and we have wait "fetch's timeout" and not "timer's timeout",
-         The timeout variable is the number of milliseconds we have waited for the message. */
-        timeouts->next->time -= timeout;
-      } else {
-      /* The timeouts->next->time variable is the number of milliseconds we have waited for the message.  */
-        if (timeouts->next->time < timeout) {
-          timeout -= timeouts->next->time;
-        } else {
-          /* either timeout == 0, or timeout must == timeouts->next->time */
-          if (timeout) timeout = SYS_ARCH_TIMEOUT;
-        }
-#endif /* LWIP_SO_RCVTIMEO */
-
@@ -107,5 +81 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-      
-#if LWIP_SO_RCVTIMEO  
-      if (timeout != SYS_ARCH_TIMEOUT)
-#endif /* LWIP_SO_RCVTIMEO */
-      
+
@@ -114,3 +83,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#if LWIP_SO_RCVTIMEO  
-      }
-#endif /* LWIP_SO_RCVTIMEO */
@@ -127 +93,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-
@@ -129,6 +94,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-  
-#if LWIP_SO_RCVTIMEO
-  if ((time == SYS_ARCH_TIMEOUT) && (msg))
-   { (*msg)=NULL;
-   }
-#endif /* LWIP_SO_RCVTIMEO */


Index: src/include/lwip/sys.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/sys.h,v
retrieving revision 1.26
diff -u -0 -p -r1.26 sys.h
--- src/include/lwip/sys.h	18 May 2007 18:34:34 -0000	1.26
+++ src/include/lwip/sys.h	22 May 2007 13:11:07 -0000
@@ -61 +60,0 @@ struct sys_timeo {u8_t dummy;};
-#define sys_mbox_fetch_timeout(m,d,t)
@@ -135,4 +133,0 @@ void sys_mbox_free(sys_mbox_t mbox);
-#if LWIP_SO_RCVTIMEO
-void sys_mbox_fetch_timeout(sys_mbox_t mbox, void **msg, u32_t timeout);
-#define sys_mbox_fetch(m,d) sys_mbox_fetch_timeout(m,d,0)
-#else
@@ -140 +134,0 @@ void sys_mbox_fetch(sys_mbox_t mbox, voi
-#endif /* LWIP_SO_RCVTIMEO */
