OSAPIEvent Class
The OSAPIEvent is a synchronisation semaphore based on event. More...
Header: | #include <OSAPI/Process/OSAPIEvent.h> |
Public Functions
OSAPIEvent() | |
virtual | ~OSAPIEvent() |
void | Destroy() |
int | IsSignalled() |
void | Reset() |
void | Set() |
int | TimedWait(int64_t delayInNs) |
int | Wait() |
Detailed Description
The OSAPIEvent is a synchronisation semaphore based on event.
Note: By default created in non-signalled state.
Usage
OSAPIEvent m_event; <some thread> m_event.Wait(); // waits for event to be set m_event.Reset(); // resets event so it can be reused <some other thread> m_event.Set(); // sets the event
See also OSAPIEventWithFd.
Member Function Documentation
OSAPIEvent::OSAPIEvent()
Constructs an event.
[virtual]
OSAPIEvent::~OSAPIEvent()
Destructs the event.
void OSAPIEvent::Destroy()
Deletes the event and releases allocated resources.
int OSAPIEvent::IsSignalled()
Checks if event is signalled.
If object is signalled, return value is 1
. If not, return value is 0
.
void OSAPIEvent::Reset()
Clears the event.
void OSAPIEvent::Set()
Sets the event. A task waiting for the event will continue.
int OSAPIEvent::TimedWait(int64_t delayInNs)
Waits for event to occur or for the specified delay.
Returns 1
if event occured or 0
on timeout.
int OSAPIEvent::Wait()
Waits for event to occur and clears the event.
Returns 1
if event occured, else 0
is returned.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.