This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: clock_settime() help
- From: sandeep <shimple0 at yahoo dot com>
- To: Sam Pham <anhmn at yahoo dot com>
- Cc: Jay Foster <jay dot foster at systech dot com>, eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 29 Oct 2004 14:44:20 +0530
- Subject: Re: [ECOS] clock_settime() help
- References: <20041028173904.91930.qmail@web54106.mail.yahoo.com>
Sam Pham wrote:
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.
some very dumb questions -
- what do you mean by that clock_settime failed??
- when you say "clock_gettime()returned a non-current time value", you mean it
returned a value lesser or more than current time?
- how do you find current time? is your order
clock_gettime
get current time
compare them
OR
get current time
clock_gettime
compare them
- if above are your steps, have you tried doing these under disabled interrupts
and found same results? i am not talking of clock_settime with disabled
interrupts, here.
sandeep
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss