This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem compiling newnet with timing stats


On Fri, 2002-06-14 at 15:03, Paul Randall wrote:
> Hi all,
> 
> I am having problems compiling the newnet (FreeBSD) template with
> CYGDBG_NET_TIMING_STATS turned on in eCos 2.0.  I can compile and run
> the original TCP/IP stack (OpenBSD) with timing stats with no problem.
> During the make for newnet, I get the following errors:
> 
 ...
> Any suggestions?

Just by way of completeness, this patch will fix the compile errors:

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;
 }


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]