This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Kernel clock handling fix
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: 10 Jul 2003 18:41:47 +0100
- Subject: Kernel clock handling fix
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.107
diff -u -5 -r1.107 ChangeLog
--- ChangeLog 6 Jul 2003 14:35:37 -0000 1.107
+++ ChangeLog 10 Jul 2003 17:40:10 -0000
@@ -1,5 +1,12 @@
+2003-07-10 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/common/clock.cxx (Cyg_Counter::tick): In unsorted list case:
+ moved saving of next node details to before re-insertion of alarms
+ with intervals. The call to add_alarm() can make enough of a
+ difference to the list to need to force a rescan.
+
2003-07-06 Bart Veer <bartv@ecoscentric.com>
* include/test/stackmon.h (cyg_test_size_a_stack):
If stack checking is enabled, look for 0xdeadbeef rather than 0x0
to determine usage. Also reset the interrupt stack to that value.
Index: src/common/clock.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/src/common/clock.cxx,v
retrieving revision 1.17
diff -u -5 -r1.17 clock.cxx
--- src/common/clock.cxx 1 Jul 2003 17:34:54 -0000 1.17
+++ src/common/clock.cxx 10 Jul 2003 17:40:20 -0000
@@ -233,26 +233,26 @@
Cyg_DNode *next_next, *next_prev;
Cyg_Alarm *head;
alarm_list_ptr->remove(alarm);
+ // Save some details of the list state so we can
+ // detect if it has changed.
+ next_next = next->get_next();
+ next_prev = next->get_prev();
+ head = alarm_list_ptr->get_head();
+
if( alarm->interval != 0 )
{
// The alarm has a retrigger interval.
// Reset the trigger time and requeue
// the alarm.
alarm->trigger += alarm->interval;
add_alarm( alarm );
}
else alarm->enabled = false;
- // Save some details of the list state so we can
- // detect if it has changed.
- next_next = next->get_next();
- next_prev = next->get_prev();
- head = alarm_list_ptr->get_head();
-
CYG_INSTRUMENT_ALARM( CALL, this, alarm );
// Call alarm function
alarm->alarm(alarm, alarm->data);
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts