This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
eCOS calling path question?Thanks a lot.
- From: <jameshq at liverpool dot ac dot uk>
- To: ecos-discuss at sources dot redhat dot com
- Date: Sat, 31 May 2003 22:53:46 +0100
- Subject: [ECOS] eCOS calling path question?Thanks a lot.
Hi all:
I have a question related to the calling path of the eCOS when
using Cyg_Flag::wait( ).
for example:
Thread 1 : priority #11
Thread 2 : priority #12
Thread 3 : priority #12
Time Slicing enabled
When Thread 1 loaded and run (sched_lock=0) --> when Cyg_Flag::wait( )
called in Thread 1 (sched_lock=0)--> Cyg_Scheduler::lock()
(sched_lock=1)
--> set Thread 1 to Wait state --> call sleep( ) and sleep thread 1
(sched_lock=1) --> Cyg_Scheduler::reschedule()--> unlock_inner( 1 )-->
switch
context and run Thread 2 --> Real Time Clock happens --> RTC IRQ
increment sched_lock by 1 (sched_lock=2) --> interrupt_end( ) -->
unlock( ) -->
unlock_inner() will not be called due to the sched_lock-1!=0, so
RTC::dsr() will not be called also Thread 3 will not be able to get
the time slot
to run (Thread 2 and 3 at the same priority) so what's going on here??
Thanks a lot.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss