aclrtIpcGetEventHandle
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Description
Sets a specified event in the current process as an inter-process communication (IPC) event and returns the event handle. Synchronizes tasks among processes on the same device or across devices.
This API must be used with the following key APIs. Processes A and B are used as an example.
- In process A:
- Call aclrtCreateEventExWithFlag to create an event with the flag ACL_EVENT_IPC.
- Call aclrtIpcGetEventHandle to obtain an IPC event handle.
- Call aclrtRecordEvent to insert the event created in 1.a into a stream.
- In process B:
- Call aclrtIpcOpenEventHandle to obtain the event handle information in process A and return the event pointer that can be used by the current process.
- Call aclrtStreamWaitEvent to make a stream wait on an event.
- After the event is used, call aclrtDestroyEvent to destroy it.
Prototype
aclError aclrtIpcGetEventHandle(aclrtEvent event, aclrtIpcEventHandle *handle)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
event |
Input |
Event. Only an event created by the aclrtCreateEventExWithFlag API and flagged with ACL_EVENT_IPC is supported. |
handle |
Output |
IPC event handle. |
Returns
0 on success; else, failure. For details, see aclError.
Parent topic: Event Management