From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3437 invoked by alias); 1 Jul 2003 17:34:54 -0000 Mailing-List: contact ecos-cvs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Post: List-Help: , Sender: ecos-cvs-owner@sources.redhat.com List-Subscribe: Received: (qmail 3427 invoked by uid 371); 1 Jul 2003 17:34:54 -0000 Date: Tue, 01 Jul 2003 17:34:00 -0000 Message-ID: <20030701173454.3425.qmail@sources.redhat.com> From: nickg@sources.redhat.com To: ecos-cvs@sources.redhat.com Subject: ecos/packages/kernel/current ChangeLog cdl/ker ... X-SW-Source: 2003/txt/msg01005.txt.bz2 List-Id: CVSROOT: /cvs/ecos Module name: ecos Changes by: nickg@sourceware.org 2003-07-01 17:34:54 Modified files: packages/kernel/current: ChangeLog packages/kernel/current/cdl: kernel.cdl packages/kernel/current/include: clock.hxx clock.inl packages/kernel/current/src/common: clock.cxx Added files: packages/kernel/current/tests: kalarm0.c Log message: * 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.