[Xcb] reason for xcb_parts being 2 elements larger?
Barton C Massey
bart at cs.pdx.edu
Mon Sep 3 22:13:07 PDT 2007
IIRC positions 0 and 1 are reserved for various kinds of
header information that also have to go out, to avoid having
to allocate a new iovec and copy. Somebody correct me if
I'm wrong...
Bart
In message <200709032246.40331.hto at arcor.de> you wrote:
> Hello,
>
> I wonder what the reason is to use e.g.
>
> struct iovec xcb_parts[6];
>
> then start filling with position 2:
>
> xcb_parts[2].iov_base =(char*) &xcb_out;
> xcb_parts[2].iov_len = sizeof(xcb_out);
> xcb_parts[3].iov_base = 0;
> xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
> [...]
>
> and then only submit the parts starting from 2:
>
> xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
>
> ??
>
> It seems to me that I could create a proper sized array and submit
> just that without adding two?
>
> Tom
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list