mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-28 11:50:37 -07:00
qemu now has generic bitmap functions,
so don't redefine them in sheepdog.c,
use common header instead. A small cleanup.
Here's only one function which is actually
used in sheepdog and gets replaced with
a generic one (simplified):
- static inline int test_bit(int nr, const volatile unsigned long *addr)
+ static inline int test_bit(int nr, const unsigned long *addr)
{
- return ((1UL << (nr % BITS_PER_LONG))
& ((unsigned long*)addr)[nr / BITS_PER_LONG])) != 0;
+ return 1UL & (addr[nr / BITS_PER_LONG] >> (nr & (BITS_PER_LONG-1)));
}
The body is equivalent, but the argument is not: there's
"volatile" in there. Why it is used for - I'm not sure.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Acked-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
||
|---|---|---|
| .. | ||
| blkdebug.c | ||
| blkverify.c | ||
| bochs.c | ||
| cloop.c | ||
| cow.c | ||
| curl.c | ||
| dmg.c | ||
| nbd.c | ||
| parallels.c | ||
| qcow.c | ||
| qcow2-cache.c | ||
| qcow2-cluster.c | ||
| qcow2-refcount.c | ||
| qcow2-snapshot.c | ||
| qcow2.c | ||
| qcow2.h | ||
| qed-check.c | ||
| qed-cluster.c | ||
| qed-gencb.c | ||
| qed-l2-cache.c | ||
| qed-table.c | ||
| qed.c | ||
| qed.h | ||
| raw-posix-aio.h | ||
| raw-posix.c | ||
| raw-win32.c | ||
| raw.c | ||
| rbd.c | ||
| rbd_types.h | ||
| sheepdog.c | ||
| vdi.c | ||
| vmdk.c | ||
| vpc.c | ||
| vvfat.c | ||