Event Management
[Nut/OS API]

Thread synchronization support. More...

Collaboration diagram for Event Management:

Thread synchronization support.

Threads may wait for events from other threads or interrupts or may post or broadcast events to other threads.

Waiting threads line up in priority ordered queues, so more than one thread may wait for the same event. A waiting queue is a simple linked list of waiting threads.

Events are posted to a waiting queue, moving the thread from waiting (sleeping) state to ready-to-run state. A running thread may also broadcast an event to a specified queue, waking up all threads on that queue.

Usually a woken up thread takes over the CPU, if it's priority is equal or higher than the currently running thread. However, events can be posted asynchronously, in which case the posting thread continues to run.

Interrupt can also post events, but have to use the specific function NutEventPostFromIrq().


© 2000-2010 by contributors - visit http://www.ethernut.de/