This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: posix time functions


Our application has the need of calling
clock_settime() to set the time.  What are the
consequences of calling this function?

Thanks.

Sam


--- Nick Garnett <nickg@ecoscentric.com> wrote:

> David Brennan <eCos@brennanhome.com> writes:
> 
> > We discovered a (perhaps) un-documented feature in
> the eCos posix
> > clock_settime and clock_gettime functions. Setting
> the time, changes
> > the system clock (number of ticks). The system
> clock should only be
> > changeable by the interrupt routine which is
> incrementing it. All
> > other code should really only have read access.
> 
> Hmm, we have also had complaints that
> clock_settime() doesn't change
> enough and want it to alter the wallclock time as
> well. I guess you
> cannot please everyone.
> 
> > Is there a chance this
> > could be changed? That is, if we fix it in the
> kernel, would that type
> > of patch be accepted.
> 
> A patch that maintains an offet for CLOCK_REALTIME
> from the main
> timer and used that when calculating timer timeouts
> would be
> fine. Depending on how much gets changed, we might
> need an assignment
> for it, though.
> 
> > I would think that setting the clock and
> > possibly losing alarms would be something that
> other people have
> > noticed before.
> 
> To be honest, I don't think that many people call
> clock_settime().
> It's mainly there for completeness.
> 
> -- 
> Nick Garnett                    eCos Kernel
> Architect
> http://www.ecoscentric.com/     The eCos and RedBoot
> experts
> 
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-- 
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]