This is the mail archive of the ecos-discuss@sourceware.org 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: why is it wrong to call cyg_semaphore_post() in ISR???



Normally, you try not to disable interrupts in RTOS's. You should
protect your critical regions with mutex's, semaphores etc.


I remember well that I(we in our company) have used intLock () in VxWorks to make sure that interrupt doesnt during some critical sections. Ofcourse we did use semaphores and mutexes to guard against other threads but as far as I remember i never used semaphores/mutexes to guard against interrupts.


lockKey = intLock ();

... (work with interrupts locked out)

intUnlock (lockKey);
Seems in eCos we dont need to disable interrupts because interrupts doesnt perform any kernal calls and we can use DSR to give semaphores and etcthank you



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


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