[PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 5 19:00:08 PST 2015


On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote:
> On Monday 05 January 2015 12:00:24 Hans de Goede wrote:
> > > +	return __builtin_ffs(tp->fake_touches >> 1);
> 
> Why the builtin instead of ffs from <strings.h>?

simple answer: was the first one that google came up with. does it matter
much though? it's supported by gcc and clang.

Cheers,
   Peter


More information about the wayland-devel mailing list