[En-Nut-Discussion] NutEventPost and event queues

Geir Svihus g.svihus at c2i.net
Tue Nov 25 20:51:28 CET 2003


Thanks Harald,

The first couple of lines answered my question. If the C runtime system
clears all global variables at system start then everything is fine. I had a
feeling
that there where something I had overlooked.

Anyway, I don't see much harm in initializing the queue pointer to zero
before the very first call to NutEventPost(), even if its a global varieble.
If you do as in ide.c using the routine ClearEvent() then the extra code
will probably be minimal. But then again, why have redundant code?

One final question regarding ide.c:

Why is hIDEEvent cleared to zero in IDEInit using EventClear, but
hIDESemaphore and hCFChangeInt is not?

Is this just a little bit of redundant code, or have I missed something
again?

Geir









More information about the En-Nut-Discussion mailing list