lwip: fix timestamps, statistics functions
authorH. Peter Anvin <hpa@zytor.com>
Fri, 18 Sep 2009 20:38:50 +0000 (13:38 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 12 Apr 2011 21:40:53 +0000 (14:40 -0700)
Add bits needed to support timestamps and stats functions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
core/lwip/src/include/arch/cc.h
core/lwip/src/include/arch/sys_arch.h

index 065afa8..add3658 100644 (file)
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <kaboom.h>
+#include <stdio.h>
 
 #define BYTE_ORDER LITTLE_ENDIAN
 
@@ -20,8 +21,13 @@ typedef uintptr_t mem_ptr_t;
 
 #define PACK_STRUCT_STRUCT     __packed
 
+#if 1
+#define LWIP_PLATFORM_DIAG(x)  do { printf x; } while(0)
+#define LWIP_PLATFORM_ASSERT(x)        do { printf("%s", (x)); kaboom(); } while(0)
+#else
 #define LWIP_PLATFORM_DIAG(x)  ((void)0) /* For now... */
 #define LWIP_PLATFORM_ASSERT(x)        kaboom()
+#endif
 
 #define U16_F  PRIu16
 #define S16_F  PRId16
index 7bae904..8912620 100644 (file)
@@ -11,6 +11,7 @@ typedef struct mailbox   *sys_mbox_t;
 typedef struct thread    *sys_thread_t;
 
 #define sys_sem_signal(x) sem_up(x)
+#define sys_now ms_timer
 
 #define SYS_MBOX_NULL  NULL
 #define SYS_SEM_NULL   NULL