[V2] Runtime: correct event and the wait events compare when check event.

Submitted by Yang, Rong R on July 17, 2015, 4:46 a.m.

Details

Message ID 1437108369-7512-1-git-send-email-rong.r.yang@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Yang, Rong R July 17, 2015, 4:46 a.m.
When the event parament is not NULL, the event will point to a new event, so
need to check address of the event and the wait events.

V2: check the address of the event and the wait events.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
---
 src/cl_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/cl_event.c b/src/cl_event.c
index b4734b2..b344480 100644
--- a/src/cl_event.c
+++ b/src/cl_event.c
@@ -221,7 +221,7 @@  cl_int cl_event_check_waitlist(cl_uint num_events_in_wait_list,
       err = CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST;
       goto exit;
     }
-    if(event && *event == event_wait_list[i])
+    if(event && event == &event_wait_list[i])
       goto error;
     if(event_wait_list[i]->ctx != ctx)
       goto error;

Comments

LGTM

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> Yang Rong

> Sent: Friday, July 17, 2015 12:46 PM

> To: beignet@lists.freedesktop.org

> Cc: Yang, Rong R

> Subject: [Beignet] [Patch V2] Runtime: correct event and the wait events

> compare when check event.

> 

> When the event parament is not NULL, the event will point to a new event, so

> need to check address of the event and the wait events.

> 

> V2: check the address of the event and the wait events.

> Signed-off-by: Yang Rong <rong.r.yang@intel.com>

> ---

>  src/cl_event.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/src/cl_event.c b/src/cl_event.c index b4734b2..b344480 100644

> --- a/src/cl_event.c

> +++ b/src/cl_event.c

> @@ -221,7 +221,7 @@ cl_int cl_event_check_waitlist(cl_uint

> num_events_in_wait_list,

>        err = CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST;

>        goto exit;

>      }

> -    if(event && *event == event_wait_list[i])

> +    if(event && event == &event_wait_list[i])

>        goto error;

>      if(event_wait_list[i]->ctx != ctx)

>        goto error;

> --

> 1.8.3.2

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet