[En-Nut-Discussion] NutEventPostAsync re-works
Matthias Ringwald
mringwal at inf.ethz.ch
Fri Jan 21 18:05:08 CET 2005
Hi all
I'd like to inform you that I first renamed the function
NutEventPostAsync into NutEventPostFromIRQ.
Then I changed all calls to NutEventPostAsync, which are from within
IRQ context, into to calls
to NutEventPostFromIRQ (for this calls, nothing really changed but the
name)
Then I made a new NutEventPostAsync which is similar to NutEventPost,
besides there is no
thread switch, if a higher thread was woken.
Also note, that the new NutEventPostAsync does not require to have IRQ
disabled.
Because the new NutEventPostAsync does not required IRQ disabled, I
removed the NutEventCritical
and NutExitCriticals calls I found in higher-layer stuff.
So if you're writing normal apps without IRQs, you're free to remove
the critical section around the NutEventPostAsync calls.
If you have IRQ handler you should change the NutEventPostAsync call
into NutEventPostFromIRQ - if you miss this your IRQ handler just take
4 cylces more.
There are two reasons for this:
1. People will not forget the critical section around the
NutEventPostAsync (API is cleaner = better)
2. In our quest to optimize IRQ latency, the NutEventPostFromIRQ has to
be optimized to shorten IRQ time.
So this can be seen as preparation for a higher goal.
hope this is ok with you.. :)
Matthias Ringwald
More information about the En-Nut-Discussion
mailing list