[En-Nut-Discussion] Another set of eyes

Harald Kipp harald.kipp at egnite.de
Tue Jul 22 11:02:53 CEST 2003


Ralph,

Understood. Yes, when handling more than one queue it might be
required to avoid context switching on each post.


>Perhaps functions that are expected to be called with interrupts disabled
>could be  FuncI eg NutPostAsyncI, or some other method that clearly points
>out the folly of the callers ways.

Usually I do not like that kind of general design rules. My
experience showed, that later it often introduces more problems
than expected on the first look. But in this special case
it seems to make sense:

Foo_I(bar)
{
....
}

Foo(bar)
{
   EnterCritical();
   Foo_I(bar);
   ExitCritical();
}

Mh...yes. Looks very clean to me and it wouldn't break exisiting code.

Harald




More information about the En-Nut-Discussion mailing list