This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

scheduler locking in Cyg_WallClock class


I have a question about cyg_drv_dsr_lock() in
Cyg_WallClock::get_current_time in wallclock.cxx.

The comments in wallclock.cxx say the calls to the hardware drivers can take
a lot of time. And mine do - my RTC is an i2c device (relatively slow). The
whole scheduler is locked for the entire time it takes to read/write from
it.

Shouldn't the decision to take this drastic of a lock be in the lower-layer
driver?

I'm guessing the scheduler lock is to protect against possible interaction
between Cyg_WallClock::get_current_time and Cyg_WallClock::set_current_time
without having to use a mutex.

+---------------------------------------
|  Daniel Helgason <danielh_AT_telus.net>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]