[ECOS] posix time functions

David Brennan eCos@brennanhome.com
Fri Oct 1 04:16:00 GMT 2004


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



More information about the Ecos-discuss mailing list