This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
posix time functions
- From: David Brennan <eCos at brennanhome dot com>
- To: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 30 Sep 2004 21:16:44 -0700
- Subject: [ECOS] posix time functions
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. Is there a chance this could
be changed? That is, if we fix it in the kernel, would that type of
patch be accepted. I would think that setting the clock and possibly
losing alarms would be something that other people have noticed before.
For now we have implemented our own time off-set and never call settime
and call our own gettime which adds our offset to the time that the OS
is returning. But this seems like the hard way of doing it.
David Brennan
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss