Allow minimal unix target to build in cygwin (but not necessarily run).

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().
This commit is contained in:
davidhaas
2003-02-18 19:27:48 +00:00
parent 1660e800e0
commit 7f1becc682
11 changed files with 37 additions and 50 deletions

View File

@@ -108,7 +108,6 @@ ip_lookup(void *header, struct netif *inp)
#if LWIP_UDP > 0
case IP_PROTO_UDP:
return udp_lookup(iphdr, inp);
break;
#endif /* LWIP_UDP */
#if LWIP_TCP > 0
case IP_PROTO_TCP:
@@ -116,7 +115,6 @@ ip_lookup(void *header, struct netif *inp)
#endif /* LWIP_TCP */
case IP_PROTO_ICMP:
return 1;
break;
default:
return 0;
}

View File

@@ -95,7 +95,7 @@ ip_reass_timer(void *arg)
{
if(ip_reasstmr > 1) {
ip_reasstmr--;
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
} else if(ip_reasstmr == 1)
ip_reasstmr = 0;
}
@@ -121,7 +121,7 @@ ip_reass(struct pbuf *p)
DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n"));
memcpy(iphdr, fraghdr, IP_HLEN);
ip_reasstmr = IP_REASS_MAXAGE;
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL);
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);
ip_reassflags = 0;
/* Clear the bitmap. */
memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));
@@ -148,7 +148,7 @@ ip_reass(struct pbuf *p)
DEBUGF(IP_REASS_DEBUG,
("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset,
offset + len, IP_REASS_BUFSIZE));
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);
sys_untimeout(ip_reass_timer, NULL);
ip_reasstmr = 0;
goto nullreturn;
}
@@ -236,7 +236,7 @@ ip_reass(struct pbuf *p)
/* If we have come this far, we have a full packet in the
buffer, so we allocate a pbuf and copy the packet into it. We
also reset the timer. */
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL);
sys_untimeout(ip_reass_timer, NULL);
ip_reasstmr = 0;
pbuf_free(p);
p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL);