[En-Nut-Discussion] Semaphores
Matthias Ringwald
mringwal at inf.ethz.ch
Mon Feb 21 11:43:26 CET 2005
hi marek
> I often use semaphores from Nut/OS but I have several comment to
> safety.
> NutSemPost and NutSemWait both write to same variable two byte
> variable with
> enabled interupt!
Ok. The main point here is that we did assume that Semaphores and Mutex
are not called from IRQ context as they are used to synchronize threads.
The only nut/os function that interacts with thread you are allowed
to call from an interrupt handler is NutEventPostFromIrq
(this is a recent change to be found in CVS HEAD)
Do you have an example case, where you would want to use mutex and/or
semaphores from Irq ?
regards,
Matthias Ringwald
> My mofification guarantee correct activity and allow semaphores
> (NutSemPostAsync) in blok with disabled interrupt or calling from
> interrupt...
>
More information about the En-Nut-Discussion
mailing list