libchip/m48t08 driver

Till Straumann strauman at slac.stanford.edu
Tue Aug 22 01:15:05 UTC 2006


On Mon, 2006-08-21 at 17:58 -0500, Joel Sherrill wrote:
> Till Straumann wrote:
> > I thought about merging some extended features
> > I implemented in BSP specific drivers for m48txx
> > series RTC chips into the generic libchip version.
> >
> > Looking at that one (i.e., libchip/rtc/m48t08.c),
> > I found that it is not thread safe.
> >
> > RFC: Would it be acceptable for this
> > driver to use a mutex?
> >
> >   
> Before doing that .. Does it do things that would be too inappropriate 
> for simply
> disabling preemption or interrupts?  Disabling preemption for short 
> periods of
> time is no worse on latency than calling a pair of directives.

Yeah - I guess that could be done. It's ~ 10 (simple) subroutine calls
(not inlined) for register access where each access takes ~100ns (bus
cycle for accessing the device), so the optimal solution might
depend on architecture.

T.
 
> 
> Otherwise, a mutex is OK.
> 
> > - T.
> >
> >
> >
> >   
> 




More information about the users mailing list