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 pbonz...@redhat.com
---
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 ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature