HANDLE osOpenEvent( SYSNAME Name );
The unique name assigned to the event object to be opened.
Returns a valid handle to the opened event object upon success, or NULL_HANDLE if the operation fails. To retrieve extended error information, call the osGetLastError function.
This function opens an existing named event object.
Events are synchronization primitives that exist in one of two states-signaled or non-signaled-and are used to notify tasks of specific system activities or conditions.
When an event is created, an optional name can be assigned to it, enabling other tasks to retrieve a handle to the object using the osOpenEvent function. Once a task has finished using the event, it must release the handle using osCloseHandle. The event object is deleted by the system only after all tasks that opened it have closed their respective handles. For further details, refer to the System Objects Management section.
To optimize memory usage, if no osOpen* functions are called within the application, the system ignores object names and excludes the name management logic from the kernel. This reduces the final footprint of the executable image. Detailed information regarding object naming and opening is available in the System Objects Management section.
For additional details regarding event behavior and synchronization, see the Event Objects section.
This function is available only when both OS_USE_EVENT and OS_OPEN_EVENT_FUNC configuration constants are set to 1. If the function is not required by the application, set OS_OPEN_EVENT_FUNC to 0 to minimize the output code size.
| Version: | 1.0 |
|---|---|
| Header file: | OS_Event.h (include OS_API.h) |
| See also: | events, HANDLE, NULL_HANDLE, OS_OPEN_EVENT_FUNC, osCloseHandle, osCreateEvent, osGetLastError, SYSNAME, system objects management |