Re: [Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-08-01 Thread Peter Xu
On Tue, Aug 01, 2017 at 09:40:09AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Mon, Jul 31, 2017 at 06:11:56PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > It is used to invert the whole bitmap. > > > > > > Would

Re: [Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-08-01 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Mon, Jul 31, 2017 at 06:11:56PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > It is used to invert the whole bitmap. > > > > Would it be easier to change bitmap_complement to use ^ > > in it's macro and

Re: [Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-07-31 Thread Peter Xu
On Mon, Jul 31, 2017 at 06:11:56PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > It is used to invert the whole bitmap. > > Would it be easier to change bitmap_complement to use ^ > in it's macro and slow_bitmap_complement, and then you could call it > with

Re: [Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-07-31 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It is used to invert the whole bitmap. Would it be easier to change bitmap_complement to use ^ in it's macro and slow_bitmap_complement, and then you could call it with src==dst to do the same thing with just that small change? Dave > Signed-off-by:

[Qemu-devel] [RFC 04/29] bitmap: introduce bitmap_invert()

2017-07-28 Thread Peter Xu
It is used to invert the whole bitmap. Signed-off-by: Peter Xu --- include/qemu/bitmap.h | 10 ++ util/bitmap.c | 13 + 2 files changed, 23 insertions(+) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index c318da1..460d899 100644 ---