This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Net - fix compile error
- From: Gary Thomas <gary at chez-thomas dot org>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 14 Jun 2002 15:37:08 -0600
- Subject: Net - fix compile error
Index: net/bsd_tcpip/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.2
diff -u -5 -p -r1.2 ChangeLog
--- net/bsd_tcpip/current/ChangeLog 5 Jun 2002 16:37:52 -0000 1.2
+++ net/bsd_tcpip/current/ChangeLog 14 Jun 2002 21:34:43 -0000
@@ -1,5 +1,10 @@
+2002-06-14 Gary Thomas <gary@chez-thomas.org>
+
+ * src/ecos/support.c:
+ Fix compile errors when CYGDBG_NET_TIMING_STATS enabled.
+
2002-06-05 Gary Thomas <gary@chez-thomas.org>
* include/netinet/in.h: Rename 'ip_opts' field (using the same
name as the structure is illegal in C++).
Index: net/bsd_tcpip/current/src/ecos/support.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/ecos/support.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 support.c
--- net/bsd_tcpip/current/src/ecos/support.c 20 May 2002 22:25:01 -0000 1.1
+++ net/bsd_tcpip/current/src/ecos/support.c 14 Jun 2002 21:34:43 -0000
@@ -191,12 +191,12 @@ show_net_times(void)
void *
cyg_net_malloc(u_long size, int type, int flags)
{
void *res;
- log(LOG_MDEBUG, "Net malloc[%d] = ", size);
START_STATS();
+ log(LOG_MDEBUG, "Net malloc[%d] = ", size);
if (flags & M_NOWAIT) {
res = cyg_mempool_var_try_alloc(net_mem, size);
} else {
res = cyg_mempool_var_alloc(net_mem, size);
}
@@ -216,12 +216,12 @@ cyg_net_free(caddr_t addr, int type)
void *
cyg_net_mbuf_alloc(int type, int flags)
{
void *res;
- log(LOG_MDEBUG, "Alloc mbuf = ");
START_STATS();
+ log(LOG_MDEBUG, "Alloc mbuf = ");
mbstat.m_mbufs++;
if (flags & M_NOWAIT) {
res = cyg_mempool_fix_try_alloc(net_mbufs);
} else {
res = cyg_mempool_fix_alloc(net_mbufs);
@@ -245,12 +245,13 @@ cyg_net_mbuf_free(caddr_t addr, int type
void *
cyg_net_cluster_alloc(void)
{
void *res;
- log(LOG_MDEBUG, "Allocate cluster = ");
+
START_STATS();
+ log(LOG_MDEBUG, "Allocate cluster = ");
res = cyg_mempool_fix_try_alloc(net_clusters);
FINISH_STATS(stats_cluster_alloc);
log(LOG_MDEBUG, "%p\n", res);
return res;
}