[Beignet] [PATCH] Runtime: return the correct error code in cl_event_check_waitlist.

Yang Rong rong.r.yang at intel.com
Mon Nov 9 20:09:56 PST 2015


Return CL_INVALID_CONTEXT if the context associated with
command_queue and events in event_wait_list are not the same.

Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 src/cl_event.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/cl_event.c b/src/cl_event.c
index bd4d700..3391669 100644
--- a/src/cl_event.c
+++ b/src/cl_event.c
@@ -247,8 +247,10 @@ cl_int cl_event_check_waitlist(cl_uint num_events_in_wait_list,
     }
     if(event && event == &event_wait_list[i])
       goto error;
-    if(event_wait_list[i]->ctx != ctx)
-      goto error;
+    if(event_wait_list[i]->ctx != ctx) {
+      err = CL_INVALID_CONTEXT;
+      goto exit;
+    }
   }
 
 exit:
-- 
2.1.4



More information about the Beignet mailing list