@@ -200,7 +200,8 @@ typedef int (*opal_accelerator_base_module_stream_wait_event_fn_t)(
200
200
* Creates an event. An event is a synchronization marker that can be
201
201
* appended to a stream to monitor device progress or synchronize the
202
202
* corresponding stream. This function will allocate memory for the object.
203
- * To release the memory, call OBJ_RELEASE(*event);
203
+ * To release the object memory and associated resources
204
+ * call opal_accelerator_base_module_destroy_event_fn_t
204
205
*
205
206
* @param[IN] dev_id Associated device for the event or
206
207
* MCA_ACCELERATOR_NO_DEVICE_ID
@@ -211,6 +212,18 @@ typedef int (*opal_accelerator_base_module_stream_wait_event_fn_t)(
211
212
typedef int (* opal_accelerator_base_module_create_event_fn_t )(
212
213
int dev_id , opal_accelerator_event_t * * event );
213
214
215
+ /**
216
+ * Destroys an event and release the object memory.
217
+ * This function should return immediately, but the event may complete
218
+ * and associated resources are released later.
219
+ *
220
+ * @param[IN] event Event to destroy
221
+ *
222
+ * @return OPAL_SUCCESS or error status on failure.
223
+ */
224
+ typedef int (* opal_accelerator_base_module_destroy_event_fn_t )(
225
+ opal_accelerator_event_t * event );
226
+
214
227
/**
215
228
* Records an event on a stream. An event recorded on the stream is
216
229
* a synchronization marker that can be used to monitor the device's
@@ -441,6 +454,7 @@ typedef struct {
441
454
opal_accelerator_base_module_synchronize_stream_fn_t synchronize_stream ;
442
455
opal_accelerator_base_module_stream_wait_event_fn_t stream_wait_event ;
443
456
opal_accelerator_base_module_create_event_fn_t create_event ;
457
+ opal_accelerator_base_module_destroy_event_fn_t destroy_event ;
444
458
opal_accelerator_base_module_record_event_fn_t record_event ;
445
459
opal_accelerator_base_module_query_event_fn_t query_event ;
446
460
0 commit comments