This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Expand on freebsd timeout assert message
- From: Jonathan Larmour <jlarmour at jifvik dot org>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Fri, 30 Apr 2004 02:13:44 +0100
- Subject: Expand on freebsd timeout assert message
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.44
diff -u -5 -p -r1.44 ChangeLog
--- ChangeLog 5 Apr 2004 16:23:53 -0000 1.44
+++ ChangeLog 30 Apr 2004 01:13:43 -0000
@@ -1,5 +1,10 @@
+2004-04-30 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/ecos/timeout.c (callout_reset): Clarify assert message on
+ expiry date from ages ago and also add comment explaining further.
+
2004-03-30 Horst Kronstorfer <horst.kronstorfer@frequentis.com>
* src/sys/kern/uipc_mbuf.c
* src/ecos/support.c
* include/sys/mbuf.h: Avoid blocking alloc from (empty) mbuf pool.
Index: src/ecos/timeout.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/ecos/timeout.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 timeout.c
--- src/ecos/timeout.c 12 May 2003 11:03:06 -0000 1.3
+++ src/ecos/timeout.c 30 Apr 2004 01:13:44 -0000
@@ -400,12 +400,15 @@ callout_reset(struct callout *c, int del
CYG_ASSERT( last_delta >= 0, "Bad last delta" );
delta = 0x7fffffff;
for (e = timeouts; e; e = e->next) {
if (e->delta) {
CYG_ASSERT( e->delta >= last_delta, "e->delta underflow" );
+ // the following triggers if the "next" timeout has not just
+ // passed, but passed by 1000 ticks - which with the normal
+ // 1 tick = 10ms means 10 seconds - a long time.
CYG_ASSERT( last_set_time + e->delta + 1000 > now,
- "Recorded alarm not in the future!" );
+ "Recorded alarm not in the future! Starved network thread?" );
if ( e->delta < delta )
delta = e->delta;
} else {
CYG_ASSERT( 0 == e->fun, "Function recorded for 0 delta" );
}