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]

Re: a confusion regarding role of schedlock


Thanks Rich,

but my confusion is about - we took sched lock as we
didn't want the threadswitch to happen, yet because of
reschedule the threadswitch will happen.

brij

> > cyg_bool Cyg_Counting_Semaphore::wait()
> > {
> > -- ..... --     
> >      // Prevent preemption
> >      Cyg_Scheduler::lock();
> > -- ..... -- 
> >          // Allow other threads to run
> >          Cyg_Scheduler::reschedule();
> > -- ..... --
> >      // Unlock the scheduler
> >      Cyg_Scheduler::unlock();
> > -- ..... --
> > }


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.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]