This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
clock_settime() help
- From: Sam Pham <anhmn at yahoo dot com>
- To: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 28 Oct 2004 09:55:00 -0700 (PDT)
- Subject: [ECOS] clock_settime() help
Hi all,
I'm having trouble with calling the clock_settime()
function. My application has the need of setting the
clock to the current time. At first, I called
clock_settime() inside my ISR, and then outside of
this ISR, I called clock_gettime() to verify if the
current time was set. I noticed that sometimes
clock_settime() failed because clock_gettime()
returned a non-current time value. So I decided to
call clock_settime() in a thread with all interrupts
disabled by calling function cyg_interrupt_disable().
However, I still observed the same failure as before.
Could anyone explain to me how I should be using
function clock_settime()? Its implementation is very
simple - just change the counter value. However, it
looks like if the kernel is in certain states, then it
won't allow anything to change this counter value.
Thanks.
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
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