aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-09-18 13:38:50 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-09-18 13:38:50 -0700
commite28bb2f6824fed69d14e44434acb14479eccc5ac (patch)
tree63d8ed36293538b46ef01cebae2710156d3eeb9e
parentb97b1d765d6502992f5bd225ab0aacbecd99b01b (diff)
downloadlwip-e28bb2f6824fed69d14e44434acb14479eccc5ac.tar.gz
lwip-e28bb2f6824fed69d14e44434acb14479eccc5ac.tar.xz
lwip-e28bb2f6824fed69d14e44434acb14479eccc5ac.zip
lwip: fix timestamps, statistics functions
Add bits needed to support timestamps and stats functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/lwip/src/arch/sys_arch.c5
-rw-r--r--core/lwip/src/include/arch/cc.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/core/lwip/src/arch/sys_arch.c b/core/lwip/src/arch/sys_arch.c
index e695dc06..696f4300 100644
--- a/core/lwip/src/arch/sys_arch.c
+++ b/core/lwip/src/arch/sys_arch.c
@@ -76,3 +76,8 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)
{
return mbox_fetch(mbox, msg, -1);
}
+
+u32_t sys_now(void)
+{
+ return jiffies() * MS_PER_JIFFY;
+}
diff --git a/core/lwip/src/include/arch/cc.h b/core/lwip/src/include/arch/cc.h
index 9d139637..2a429de5 100644
--- a/core/lwip/src/include/arch/cc.h
+++ b/core/lwip/src/include/arch/cc.h
@@ -24,7 +24,7 @@ typedef uintptr_t mem_ptr_t;
#define PACK_STRUCT_END
#if 1
-#define LWIP_PLATFORM_DIAG(x) do { printf message; } while (0)
+#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... */