Index: ChangeLog =================================================================== RCS file: /project/cvsroot/vcs_3020_series/vds6000/software/os/ecos/ecos/packages/kernel/current/ChangeLog,v retrieving revision 1.1.1.1.8.1 diff -u -U5 -r1.1.1.1.8.1 ChangeLog --- ChangeLog 2003/06/26 11:55:44 1.1.1.1.8.1 +++ ChangeLog 2003/06/27 12:05:30 @@ -1,5 +1,12 @@ +2003-06-27 Reinhard Jessich + + * src/common/clock.cxx (Cyg_Alarm::initialize): Bugfix: guard + the whole function with Cyg_Scheduler::lock() and + Cyg_Scheduler::unlock() to avoid race conditions when initializing + the same timer from different threads or a DSR. + 2003-06-25 Thomas Binder * src/common/clock.cxx (Cyg_Counter::rem_alarm): Bugfix: call Cyg_Scheduler::lock() before calculation of index into alarm_list array to avoid race condition with multi list counters. Index: src/common/clock.cxx =================================================================== RCS file: /project/cvsroot/vcs_3020_series/vds6000/software/os/ecos/ecos/packages/kernel/current/src/common/clock.cxx,v retrieving revision 1.4.2.1 diff -u -U5 -r1.4.2.1 clock.cxx --- src/common/clock.cxx 2003/06/26 11:55:45 1.4.2.1 +++ src/common/clock.cxx 2003/06/27 12:05:30 @@ -707,10 +707,12 @@ cyg_tick_count i // Relative retrigger interval ) { CYG_REPORT_FUNCTION(); + Cyg_Scheduler::lock(); + // If already enabled, remove from counter if( enabled ) counter->rem_alarm(this); CYG_INSTRUMENT_ALARM( INIT, this, 0 ); @@ -723,10 +725,12 @@ trigger = t; interval = i; counter->add_alarm(this); + + Cyg_Scheduler::unlock(); } // ------------------------------------------------------------------------- // Synchronize with a past alarm stream that had been disabled, // bring past times into synch, and the like.