&mem, obj_origin, obj_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
ptr, {}, obj_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
&mem, obj_origin, obj_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
ptr, host_origin, host_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
&img, src_origin, src_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
ptr, {}, src_pitch,
region));
+ if (blocking)
+ hev().wait_signalled();
+
ret_object(rd_ev, hev);
return CL_SUCCESS;
void *map = mem.resource(q).add_map(q, flags, blocking, obj_origin, region);
- ret_object(rd_ev, create<hard_event>(q, CL_COMMAND_MAP_BUFFER, deps));
+ auto hev = create<hard_event>(q, CL_COMMAND_MAP_BUFFER, deps);
+ if (blocking)
+ hev().wait_signalled();
+
+ ret_object(rd_ev, hev);
ret_error(r_errcode, CL_SUCCESS);
return map;
void *map = img.resource(q).add_map(q, flags, blocking, origin, region);
- ret_object(rd_ev, create<hard_event>(q, CL_COMMAND_MAP_IMAGE, deps));
+ auto hev = create<hard_event>(q, CL_COMMAND_MAP_IMAGE, deps);
+ if (blocking)
+ hev().wait_signalled();
+
+ ret_object(rd_ev, hev);
ret_error(r_errcode, CL_SUCCESS);
return map;