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

@@ -36,9 +36,9 @@
#ifdef LWIP_DEBUG
#define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x) } while(0)
#define DEBUGF(debug, x) do { if(debug) LWIP_PLATFORM_DIAG(x) } while(0)
#define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x) } while(0)
#define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
#define DEBUGF(debug, x) do { if(debug) LWIP_PLATFORM_DIAG(x); } while(0)
#define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0)
/* These defines control the amount of debugging output: */
#define MEM_TRACKING

View File

@@ -1,29 +0,0 @@
#ifndef __LWIP_EVENT_H__
#define __LWIP_EVENT_H__
#include "lwip/opt.h"
#if LWIP_EVENT_API
#include "lwip/pbuf.h"
enum lwip_event {
LWIP_EVENT_ACCEPT,
LWIP_EVENT_SENT,
LWIP_EVENT_RECV,
LWIP_EVENT_CONNECTED,
LWIP_EVENT_POLL,
LWIP_EVENT_ERR
};
struct tcp_pcb;
err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb,
enum lwip_event,
struct pbuf *p,
u16_t size,
err_t err);
#endif /* LWIP_EVENT_API */
#endif /* __LWIP_EVENT_H__ */

View File

@@ -91,7 +91,7 @@ void sys_init(void);
*
*/
void sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
void sys_timeout_remove(sys_timeout_handler h, void *arg);
void sys_untimeout(sys_timeout_handler h, void *arg);
struct sys_timeouts *sys_arch_timeouts(void);
/* Semaphore functions. */

View File

@@ -44,8 +44,6 @@
#include "lwip/err.h"
#include "lwip/event.h"
struct tcp_pcb;
/* Functions for interfacing with TCP: */
@@ -307,6 +305,22 @@ struct tcp_pcb_listen {
};
#if LWIP_EVENT_API
enum lwip_event {
LWIP_EVENT_ACCEPT,
LWIP_EVENT_SENT,
LWIP_EVENT_RECV,
LWIP_EVENT_CONNECTED,
LWIP_EVENT_POLL,
LWIP_EVENT_ERR
};
err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb,
enum lwip_event,
struct pbuf *p,
u16_t size,
err_t err);
#define TCP_EVENT_ACCEPT(pcb,err,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\
LWIP_EVENT_ACCEPT, NULL, 0, err)
#define TCP_EVENT_SENT(pcb,space,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\