Mercurial > ecos-v3_0-branch
diff packages/kernel/current/include/clock.inl @ 1088:4c13726203c5
* include/clock.hxx: Made Cyg_Counter::add_alarm() and
Cyg_Counter::rem_alarm() private functions. They no longer lock
the scheduler, so should not be called directly, only via the
Cyg_Alarm functions.
* include/clock.inl: Removed inline version of
Cyg_Alarm::disable(). It's no longer a one-liner and is thus
better as a proper function.
* src/common/clock.cxx (Cyg_Counter::tick): Rewrote the unsorted
list option. If the function of one alarm adds or removes other
alarms, then is was possible for the list to become corrupted. The
new implementation attempts to avoid this problem.
(Cyg_Alarm::initialize): Added scheduler locking to protect the
enabled flag.
(Cyg_Alarm::enable): Ditto.
(Cyg_Alarm::disable): Ditto. Moved here from clock.inl.
(Cyg_Alarm::add_alarm): Removed scheduler locking, it is now
always called from functions that have already locked it. Added an
assertion to double-check this.
(Cyg_Alarm::rem_alarm): Ditto.
* cdl/kernel.cdl:
* tests/kalarm0.c:
Added new test to test that alarms can be added and removed in
alarm functions safely.
| author | nickg |
|---|---|
| date | Tue, 01 Jul 2003 17:34:53 +0000 |
| parents | d2c90368aeef |
| children | 74dbf4c3f2e1 |
line wrap: on
line diff
--- a/packages/kernel/current/include/clock.inl +++ b/packages/kernel/current/include/clock.inl @@ -121,16 +121,5 @@ inline cyg_tick_count Cyg_Clock::convert } // ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- -// Alarm inlines - -// Ensure alarm disabled -inline void Cyg_Alarm::disable() -{ - if( enabled ) counter->rem_alarm(this); -} - - -// ------------------------------------------------------------------------- #endif // ifndef CYGONCE_KERNEL_CLOCK_INL // EOF clock.inl
