Statistics
| Branch: | Revision:

root / bitops.h @ 7c2eaca4

History | View | Annotate | Download (9.5 kB)

# Date Author Comment
17a4ed8a 08/04/2012 06:51 pm Blue Swirl

bitops: drop volatile qualifier

Qualifier 'volatile' is not useful for applications, it's too strict
for single threaded code but does not give the real atomicity guarantees
needed for multithreaded code.

Drop them and now useless casts.

Signed-off-by: Blue Swirl <>

ab411770 07/13/2012 12:38 pm Stefan Weil

bitops: Fix documentation

Signed-off-by: Stefan Weil <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

84988cf9 07/07/2012 12:07 pm Peter Maydell

bitops.h: Add functions to extract and deposit bitfields

Add functions deposit32(), deposit64(), extract32() and extract64()
to extract and deposit bitfields in 32 and 64 bit words. Based on
ideas by Jia Liu and Avi Kivity.

Suggested-by: Jia Liu <>...

84803d7a 02/25/2011 07:21 pm Blue Swirl

bitops: fix error on OpenBSD and mingw32

Fix this error:
CC bitops.o
In file included from /src/qemu/bitops.c:14:
/src/qemu/bitops.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'

Signed-off-by: Blue Swirl <>

04483e15 02/25/2011 07:19 pm Corentin Chary

bitops: fix test_and_change_bit()

./bitops.h:192: warning: ‘old’ is used uninitialized in this function

Signed-off-by: Corentin Chary <>
Signed-off-by: Blue Swirl <>

e0e53b2f 02/24/2011 12:28 am Corentin Chary

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...