|
noexcept |
Creates an event object of the specified type.
[out] | pEvent | is a pointer to a buffer receiving an identifier of the created event. |
[in] | fManualReset | is a flag defining if the event is to be of a manual-reset type or of an auto-reset type. |
[in] | fInitialState | specifies if the event is to be initially in signalled state. |
The manual-reset event objects require calling the chsv_event_reset over them in order to set their state to nonsignalled. On the contrary the auto-reset events are automatically set to a nonsignalled state when any threads successfully acquires their ownership using chsv_event_wait, chsv_event_timedwait or chsv_event_timedwaitfor functions. On the other hand the auto-reset event can also be explicitly reset by the chsv_event_reset function.
If multiple threads are blocked invoking the wait functions, than all of them can be released if they are waiting for the manual-reset event. But only one of the waiting threads can be released if the event is of auto-reset type.
The function does not correspond to any of the C11 functions but partially corresponds to Win32 CreateEvent function.