[ECOS] why is it wrong to call cyg_semaphore_post() in ISR???

Andrew Lunn andrew@lunn.ch
Fri Jun 9 09:27:00 GMT 2006


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



More information about the Ecos-discuss mailing list