nn::os::Event Class

Header file: nn/os.h

Syntax

class Event : public nn::os::EventBase

Description

Class for handling events. Events are synchronization objects that send notification that an event has occurred.

Generally, use the nn::os::LightEvent class instead of nn::os::Event. The nn::os::LightEvent class is better than the nn::os::Event class in most respects, except that it cannot wait for multiple synchronization objects at the same time.

An event has two possible states: signaled and non-signaled. The Wait operation for an Event waits until the event enters the signaled state.

There are two types of events: those that are manually reset and those that are automatically reset. This characteristic can be configured by parameters during initialization.

Manually resetting events always remain in the signaled state from the time they are signaled with Signal until ClearSignal is called. When such events are in the signaled state, all Wait operations waiting for them are released.

When an automatically resetting event is signaled by Signal, only one of the threads waiting on it is released: the thread with the highest priority among those threads that are able to be released. If there is more than one such thread with the highest priority, only one of them is released. No other threads are released.

You can create up to 32 Event objects. Note also that different functions might use up resources that count against this limit.

Member Functions

Event Constructs and initializes an event.
Initialize Initializes an event.
Finalize Destroys an event.
~Event Destructor.
Signal Puts an event into the signaled state.
Wait Waits for an event to enter the signaled state.
ClearSignal Clears an event manually.

Class Hierarchy

ADLFireWall::NonCopyable
  nn::os::HandleObject
    nn::os::WaitObject
      nn::os::InterruptEvent
        nn::os::EventBase
          nn::os::Event

See Also

nn::os::Semaphore

Revision History

2010/01/07
Initial version.

CONFIDENTIAL