summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJunyan He <junyan.he@intel.com>2016-04-07 15:04:56 +0800
committerJunyan He <junyan.he@intel.com>2016-04-07 15:04:56 +0800
commitd94e9af7947504aefc0117ff13965ae2123db47b (patch)
tree8358a85cbc7f98e80a1a50e70f1089906e82ed5d /include
parentec81a026ed62ebd427daeae4ac723517e0a59916 (diff)
user cb
Diffstat (limited to 'include')
-rw-r--r--include/cl_event.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/cl_event.h b/include/cl_event.h
index 3298bf5c..ffbebf93 100644
--- a/include/cl_event.h
+++ b/include/cl_event.h
@@ -23,6 +23,15 @@
#include "CL/cl.h"
typedef void (CL_CALLBACK *cl_event_notify)(cl_event event, cl_int event_command_exec_status, void *user_data);
+typedef struct _cl_event_user_cb {
+ cl_int status; /* The execution status */
+ cl_bool executed; /* Indicat the callback function been called or not */
+ cl_event_notify pfn_notify; /* Callback function */
+ void* user_data; /* Callback user data */
+ struct _cl_event_user_cb* next; /* Next event callback in list */
+} _cl_event_user_cb;
+
+typedef struct _cl_event_user_cb* cl_event_user_cb;
typedef struct _cl_event {
uint64_t magic; /* To identify it as a sampler object */
@@ -32,8 +41,7 @@ typedef struct _cl_event {
cl_command_queue queue; /* The command queue associated with event, NULL for usr event */
cl_command_type type; /* The command type associated with event */
cl_int status; /* The execution status */
- cl_event_notify pfn_notify; /* User set callback. */
- void* user_data; /* The user data */
+ cl_event_user_cb user_cb; /* User set callback. */
cl_bool user_event; /* User create event. */
cl_ulong timestamp[4]; /* The time stamps for profiling. */
cl_event* wait_events; /* The events we are waiting for. */