[Beignet] [PATCH] Runtime: return the correct error code in cl_event_check_waitlist.
Luo, Xionghu
xionghu.luo at intel.com
Wed Nov 18 23:30:12 PST 2015
LGTM, thanks.
Luo Xionghu
Best Regards
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Yang Rong
Sent: Tuesday, November 10, 2015 12:10 PM
To: beignet at lists.freedesktop.org
Cc: Yang, Rong R
Subject: [Beignet] [PATCH] Runtime: return the correct error code in cl_event_check_waitlist.
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
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list