|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 10 of 24] libxc: add bitmap_clear function
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1317653607 -7200
# Node ID b85b2fa9a485cdd815eb9eb3e3a7794b462fa814
# Parent 5d2d87fb19e4749ca11d9d002ee5b44271594cb3
libxc: add bitmap_clear function
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
diff -r 5d2d87fb19e4 -r b85b2fa9a485 tools/libxc/xc_bitops.h
--- a/tools/libxc/xc_bitops.h
+++ b/tools/libxc/xc_bitops.h
@@ -4,6 +4,7 @@
/* bitmap operations for single threaded access */
#include <stdlib.h>
+#include <string.h>
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
#define ORDER_LONG (sizeof(unsigned long) == 4 ? 5 : 6)
@@ -25,6 +26,11 @@ static inline unsigned long *bitmap_allo
return calloc(1, bitmap_size(nr_bits));
}
+static inline void bitmap_clear(unsigned long *addr, int nr_bits)
+{
+ memset(addr, 0, bitmap_size(nr_bits));
+}
+
static inline int test_bit(int nr, volatile unsigned long *addr)
{
return (BITMAP_ENTRY(nr, addr) >> BITMAP_SHIFT(nr)) & 1;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
[Xen-devel] [PATCH 11 of 24] xenpaging: retry unpageable gfns, Olaf Hering
[Xen-devel] [PATCH 10 of 24] libxc: add bitmap_clear function,
Olaf Hering <=
[Xen-devel] [PATCH 16 of 24] libxl: use libxl__wait_for_offspring for device model, Olaf Hering
[Xen-devel] [PATCH 24 of 24] xenpaging: libxl support, Olaf Hering
[Xen-devel] [PATCH 18 of 24] libxl: use libxl__spawn_confirm_offspring_startup for device model, Olaf Hering
[Xen-devel] [PATCH 03 of 24] xenpaging: use PERROR to print errno, Olaf Hering
[Xen-devel] [PATCH 01 of 24] xenpaging: remove filename from comment, Olaf Hering
[Xen-devel] [PATCH 07 of 24] xenpaging: move page add/resume loops into its own function, Olaf Hering
[Xen-devel] [PATCH 23 of 24] xenpaging: add cmdline interface for pager, Olaf Hering
[Xen-devel] [PATCH 15 of 24] libxl: add libxl__wait_for_offspring function, Olaf Hering
|
|
|
|
|