[igt-dev] [PATCH i-g-t v4 01/11] lib/igt_dummyload: add igt_cork
Chris Wilson
chris at chris-wilson.co.uk
Wed Feb 21 23:26:11 UTC 2018
Quoting Antonio Argenziano (2018-02-21 23:19:37)
> +struct igt_cork {
> + enum igt_cork_type type;
> +
> + union __cork {
> + int fd;
> +
> + struct igt_cork_vgem vgem;
> + struct igt_cork_sw_sync sw_sync;
> + } cork;
Anonymous unions ftw.
Then instead of needing vgem_cork->device, you can just write
cork->vgem.device.
-Chris
More information about the igt-dev
mailing list