[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 36/47] host-utils: add ffsl and flsl

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 36/47] host-utils: add ffsl and flsl
Date: Fri, 27 Jul 2012 10:05:03 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 07/24/2012 05:04 AM, Paolo Bonzini wrote:
> We can provide fast versions based on the other functions defined
> by host-utils.h.  Some care is required on glibc, which provides
> ffsl already.
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  host-utils.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)

> +#ifdef __GLIBC__
> +#define ffsl qemu_ffsl
> +#endif
> +static inline int ffsl(long val)

ffsl() makes sense in comparison to the standardized ffs() (why POSIX
doesn't specify one is beyond me).

> +
> +static inline int flsl(long val)

But what good is flsl (I'm assuming you mean find-last-set, or the
most-significant set bit), especially since there is no standardized
fls() and no fls() in host-utils.h?

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]