[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 15/21] bitmap: add bitmap_count_between() functi
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH 15/21] bitmap: add bitmap_count_between() function |
Date: |
Tue, 31 Jan 2017 15:15:19 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Dec 23, 2016 at 05:28:58PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> Reviewed-by: Pavel Butsykin <address@hidden>
> ---
> include/qemu/bitmap.h | 4 ++++
> util/bitmap.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 31 insertions(+)
>
> diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
> index 63ea2d0..3bfc33e 100644
> --- a/include/qemu/bitmap.h
> +++ b/include/qemu/bitmap.h
> @@ -216,6 +216,10 @@ static inline int bitmap_intersects(const unsigned long
> *src1,
> }
> }
>
> +unsigned long bitmap_count_between(const unsigned long *src,
> + unsigned long start,
> + unsigned long end);
Please add this to the table of functions documented at the top of the
header file.
> +
> void bitmap_set(unsigned long *map, long i, long len);
> void bitmap_set_atomic(unsigned long *map, long i, long len);
> void bitmap_clear(unsigned long *map, long start, long nr);
> diff --git a/util/bitmap.c b/util/bitmap.c
> index 43ed011..e5aaa1c 100644
> --- a/util/bitmap.c
> +++ b/util/bitmap.c
> @@ -336,3 +336,30 @@ int slow_bitmap_intersects(const unsigned long *bitmap1,
> }
> return 0;
> }
> +
> +unsigned long bitmap_count_between(const unsigned long *src,
> + unsigned long start,
> + unsigned long end)
Most of the other functions use long start and long nr. Please follow
that convention.
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-block] [PATCH 15/21] bitmap: add bitmap_count_between() function,
Stefan Hajnoczi <=