|
From: <sv...@va...> - 2009-05-24 07:33:45
|
Author: bart
Date: 2009-05-24 08:33:38 +0100 (Sun, 24 May 2009)
New Revision: 10128
Log:
Comment-only changes.
Modified:
branches/DRDDEV/drd/drd_bitmap.h
Modified: branches/DRDDEV/drd/drd_bitmap.h
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.h 2009-05-24 07:20:24 UTC (rev 10127)
+++ branches/DRDDEV/drd/drd_bitmap.h 2009-05-24 07:33:38 UTC (rev 10128)
@@ -57,20 +57,23 @@
#define ADDR_IGNORED_MASK ((1U << ADDR_IGNORED_BITS) - 1U)
#define ADDR_GRANULARITY (1U << ADDR_IGNORED_BITS)
-/** Round argument a up to a multiple of (1 << ADDR_GRANULARITY), and next
- * shift it right ADDR_GRANULARITY bits. The expression below is optimized
- * for the case where a is a constant.
+/**
+ * Round argument a up to a multiple of (1 << ADDR_GRANULARITY), and next
+ * shift it right ADDR_GRANULARITY bits. The expression below is optimized
+ * for the case where a is a constant.
*/
#define SCALED_SIZE(a) \
(((((a) - 1U) | ADDR_IGNORED_MASK) + 1U) >> ADDR_IGNORED_BITS)
-/** Number of bits assigned to the least significant component of an address.
+/**
+ * Number of bits assigned to the least significant component of an address.
*/
#define ADDR_LSB_BITS 12
-/** Mask that has to be applied to an address of type Addr in order to
- * compute the least significant part of an address split, after having
- * shifted the address bits ADDR_GRANULARITY to the right.
+/**
+ * Mask that has to be applied to an address of type Addr in order to
+ * compute the least significant part of an address split, after having
+ * shifted the address bits ADDR_GRANULARITY to the right.
*/
#define ADDR_LSB_MASK (((UWord)1 << ADDR_LSB_BITS) - 1U)
@@ -111,9 +114,10 @@
+ 1U);
}
-/** Convert LSB and MSB back into an address.
+/**
+ * Convert LSB and MSB back into an address.
*
- * @note It is assumed that sizeof(Addr) == sizeof(UWord).
+ * @note It is assumed that sizeof(Addr) == sizeof(UWord).
*/
static __inline__
Addr make_address(const UWord a1, const UWord a0)
@@ -126,10 +130,10 @@
-/* Number of bits that fit in a variable of type UWord. */
+/** Number of bits that fit in a variable of type UWord. */
#define BITS_PER_UWORD (8U * sizeof(UWord))
-/* Log2 of BITS_PER_UWORD. */
+/** Log2 of BITS_PER_UWORD. */
#if defined(VGA_x86) || defined(VGA_ppc32)
#define BITS_PER_BITS_PER_UWORD 5
#elif defined(VGA_amd64) || defined(VGA_ppc64)
@@ -138,18 +142,19 @@
#error Unknown platform.
#endif
-/** Number of UWord's needed to store one bit per address LSB.
- */
+/** Number of UWord's needed to store one bit per address LSB. */
#define BITMAP1_UWORD_COUNT (1U << (ADDR_LSB_BITS - BITS_PER_BITS_PER_UWORD))
-/** Mask that has to be applied to an (Addr >> ADDR_IGNORED_BITS) expression
- * in order to compute the least significant part of an UWord.
+/**
+ * Mask that has to be applied to an (Addr >> ADDR_IGNORED_BITS) expression
+ * in order to compute the least significant part of an UWord.
*/
#define UWORD_LSB_MASK (((UWord)1 << BITS_PER_BITS_PER_UWORD) - 1)
-/** Compute index into bm0[] array.
+/**
+ * Compute index into bm0[] array.
*
- * @param a Address shifted right ADDR_IGNORED_BITS bits.
+ * @param a Address shifted right ADDR_IGNORED_BITS bits.
*/
static __inline__
UWord uword_msb(const UWord a)
@@ -160,9 +165,10 @@
return a >> BITS_PER_BITS_PER_UWORD;
}
-/** Return the least significant bits.
+/**
+ * Return the least significant bits.
*
- * @param a Address shifted right ADDR_IGNORED_BITS bits.
+ * @param a Address shifted right ADDR_IGNORED_BITS bits.
*/
static __inline__
UWord uword_lsb(const UWord a)
@@ -173,10 +179,11 @@
return a & UWORD_LSB_MASK;
}
-/** Compute the highest address lower than a for which
- * uword_lsb(address_lsb(a)) == 0.
+/**
+ * Compute the highest address lower than a for which
+ * uword_lsb(address_lsb(a)) == 0.
*
- * @param a Address.
+ * @param a Address.
*/
static __inline__
Addr first_address_with_same_uword_lsb(const Addr a)
@@ -347,8 +354,9 @@
-/** Rotate elements cache[0..n-1] such that the element at position n-1 is
- * moved to position 0. This allows to speed up future cache lookups.
+/**
+ * Rotate elements cache[0..n-1] such that the element at position n-1 is
+ * moved to position 0. This allows to speed up future cache lookups.
*/
static __inline__
void bm_cache_rotate(struct bm_cache_elem cache[], const int n)
@@ -492,12 +500,13 @@
bm->cache[0].bm2 = bm2;
}
-/** Look up the address a1 in bitmap bm and return a pointer to a potentially
- * shared second level bitmap. The bitmap where the returned pointer points
- * at may not be modified by the caller.
+/**
+ * Look up the address a1 in bitmap bm and return a pointer to a potentially
+ * shared second level bitmap. The bitmap where the returned pointer points
+ * at may not be modified by the caller.
*
- * @param a1 client address shifted right by ADDR_LSB_BITS.
- * @param bm bitmap pointer.
+ * @param a1 client address shifted right by ADDR_LSB_BITS.
+ * @param bm bitmap pointer.
*/
static __inline__
const struct bitmap2* bm2_lookup(struct bitmap* const bm, const UWord a1)
@@ -516,11 +525,12 @@
return bm2;
}
-/** Look up the address a1 in bitmap bm and return a pointer to a second
- * level bitmap that is not shared and hence may be modified.
+/**
+ * Look up the address a1 in bitmap bm and return a pointer to a second
+ * level bitmap that is not shared and hence may be modified.
*
- * @param a1 client address shifted right by ADDR_LSB_BITS.
- * @param bm bitmap pointer.
+ * @param a1 client address shifted right by ADDR_LSB_BITS.
+ * @param bm bitmap pointer.
*/
static __inline__
struct bitmap2*
@@ -540,10 +550,11 @@
return bm2;
}
-/** Insert an uninitialized second level bitmap for the address a1.
+/**
+ * Insert an uninitialized second level bitmap for the address a1.
*
- * @param bm bitmap pointer.
- * @param a1 client address shifted right by ADDR_LSB_BITS.
+ * @param bm bitmap pointer.
+ * @param a1 client address shifted right by ADDR_LSB_BITS.
*/
static __inline__
struct bitmap2* bm2_insert(struct bitmap* const bm, const UWord a1)
@@ -576,11 +587,12 @@
return bm2_copy;
}
-/** Look up the address a1 in bitmap bm, and insert it if not found.
- * The returned second level bitmap may not be modified.
+/**
+ * Look up the address a1 in bitmap bm, and insert it if not found.
+ * The returned second level bitmap may not be modified.
*
- * @param a1 client address shifted right by ADDR_LSB_BITS.
- * @param bm bitmap pointer.
+ * @param a1 client address shifted right by ADDR_LSB_BITS.
+ * @param bm bitmap pointer.
*/
static __inline__
struct bitmap2* bm2_lookup_or_insert(struct bitmap* const bm, const UWord a1)
@@ -612,11 +624,12 @@
return bm2;
}
-/** Look up the address a1 in bitmap bm, and insert it if not found.
- * The returned second level bitmap may be modified.
+/**
+ * Look up the address a1 in bitmap bm, and insert it if not found.
+ * The returned second level bitmap may be modified.
*
- * @param a1 client address shifted right by ADDR_LSB_BITS.
- * @param bm bitmap pointer.
+ * @param a1 client address shifted right by ADDR_LSB_BITS.
+ * @param bm bitmap pointer.
*/
static __inline__
struct bitmap2* bm2_lookup_or_insert_exclusive(struct bitmap* const bm,
|