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]

On Alarms...


Hi, 
   A few questions on alarms.
  
1> Are Alarms like interrupts? If so, what's the
priority? I've been using Alarms and they seem to stop
even the highest of priority tasks. But just curios on
how it's implemented internally. Is there a more
comprehensive doc to read up on this.

2> I was trying to toggle between starting a thread
and suspending it using an Alarm. 
void alarm_func(){
   if (thread is suspended)
       cyg_thread_resume
   else 
       cyg_thread_suspend
}
But if I keep the Alarm resolution too small, say the
Alarm triggers every 2 ticks (2*10ms), the thread does
not resume. It's as if the scheduler is taking more
than 2 ms to start the thread. Any insight into what's
wrong? Ofcourse, if I give the ALARM resolution as
100ms (10ticks), the thread toggles allright.

3. Can we have more than one periodic Alarm? I mean if
I have two alarms, and both trigger every 100ms, only
the alarm enabled seems to be activated. The first one
dosent seem to work. Any insight?

Thanks in advance,
Milind
 

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]