bitmap: add a generic bitmap and bitops library
authorCorentin Chary <corentincj@iksaif.net>
Fri, 4 Feb 2011 08:06:04 +0000 (09:06 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 23 Feb 2011 22:28:29 +0000 (16:28 -0600)
commitea17539203f404bb07b10453781c71c9956e638b
treee21f1f39b8b0f382b96a61402f89212db6f52b14
parent27ad925067165acccc0c51c358ad05180e4f17d2
bitmap: add a generic bitmap and bitops library

Add most used bitmap and bitops functions into bitmap.c and bitops.c.
Theses functions are mostly copied from Linux kernel source.

Some of these functions are already redefined in the VNC server. Some
of them could be used for some block stuff. The yet yo be submitted
NUMA work also need bitmaps.

bitops_ffsl() and bitops_flsl() are here because bitops/bitmap works
on unsigned long, not int, and we can't use current code because:
* ffs only works on int
* qemu_fls only works on int
* ffsl is a GNU extension

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile.objs
bitmap.c [new file with mode: 0644]
bitmap.h [new file with mode: 0644]
bitops.c [new file with mode: 0644]
bitops.h [new file with mode: 0644]
osdep.h