Use C99 named initializers to fill in events passed to XSendEvent
Forces compiler to zero-fill unset fields in the struct (fixing bug 81236)
and allows optimizer to order field initialization to best fit cache layout
or other considerations.
Before & after output of gcc -S on AMD64 shows insertion of "rep stosq"
instructions to rapidly zero-fill structs.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Showing
Please
register
or
sign in
to comment