This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: why is it wrong to call cyg_semaphore_post() in ISR???
On Fri, Jun 09, 2006 at 11:18:14AM +0200, Monica Dsz wrote:
>
> >It's a trade off - do you prevent interrupts (hence ISR routines) from
> >running during all data critical sections or do you simply not allow
> >those [ISR] functions to execute code that might perturb critical data?
> >eCos chooses the latter method which allows for lower interrupt latency
> >by putting off things until the DSR can be safely run.
> >
>
> just to confirm my understanding, does this mean that we never have to
> disable and re-enable the interrupts during critical sections? or are there
> any cases still we have to disable the interrupts in eCos.
Normally, you try not to disable interrupts in RTOS's. You should
protect your critical regions with mutex's, semaphores etc.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss