mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Remove the incorrect ALIGN macro (missing "* (align)") and replace it with ROUND_UP.
svn path=/trunk/; revision=11050
This commit is contained in:
parent
fceb614b2b
commit
ee0f0ee26f
1 changed files with 5 additions and 8 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: bitmap.c,v 1.2 2004/09/25 03:20:16 arty Exp $
|
/* $Id: bitmap.c,v 1.3 2004/09/25 19:39:57 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -36,9 +36,6 @@
|
||||||
|
|
||||||
/* MACROS *******************************************************************/
|
/* MACROS *******************************************************************/
|
||||||
|
|
||||||
#define ALIGN(x,align) \
|
|
||||||
(((x)+(align)-1) / (align))
|
|
||||||
|
|
||||||
#define MASK(Count, Shift) \
|
#define MASK(Count, Shift) \
|
||||||
((Count) == 32 ? 0xFFFFFFFF : ~(0xFFFFFFFF << (Count)) << (Shift))
|
((Count) == 32 ? 0xFFFFFFFF : ~(0xFFFFFFFF << (Count)) << (Shift))
|
||||||
|
|
||||||
|
@ -142,7 +139,7 @@ RtlAreBitsSet(PRTL_BITMAP BitMapHeader,
|
||||||
* @implemented
|
* @implemented
|
||||||
*
|
*
|
||||||
* Note: According to the documentation, SizeOfBitmap is in bits, so the
|
* Note: According to the documentation, SizeOfBitmap is in bits, so the
|
||||||
* ALIGN(...) must be divided by the number of bits per byte here.
|
* ROUND_UP(...) must be divided by the number of bits per byte here.
|
||||||
* This function is exercised by the whole page allocator in npool.c
|
* This function is exercised by the whole page allocator in npool.c
|
||||||
* which is how i came across this error.
|
* which is how i came across this error.
|
||||||
*/
|
*/
|
||||||
|
@ -151,7 +148,7 @@ RtlClearAllBits(IN OUT PRTL_BITMAP BitMapHeader)
|
||||||
{
|
{
|
||||||
memset(BitMapHeader->Buffer,
|
memset(BitMapHeader->Buffer,
|
||||||
0x00,
|
0x00,
|
||||||
ALIGN(BitMapHeader->SizeOfBitMap, 8) / 8);
|
ROUND_UP(BitMapHeader->SizeOfBitMap, 8) / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -743,7 +740,7 @@ RtlNumberOfSetBits(PRTL_BITMAP BitMapHeader)
|
||||||
* @implemented
|
* @implemented
|
||||||
*
|
*
|
||||||
* Note: According to the documentation, SizeOfBitmap is in bits, so the
|
* Note: According to the documentation, SizeOfBitmap is in bits, so the
|
||||||
* ALIGN(...) must be divided by the number of bits per byte here.
|
* ROUND_UP(...) must be divided by the number of bits per byte here.
|
||||||
* The companion function, RtlClearAllBits, is exercised by the whole page
|
* The companion function, RtlClearAllBits, is exercised by the whole page
|
||||||
* allocator in npool.c which is how i came across this error.
|
* allocator in npool.c which is how i came across this error.
|
||||||
*/
|
*/
|
||||||
|
@ -752,7 +749,7 @@ RtlSetAllBits(IN OUT PRTL_BITMAP BitMapHeader)
|
||||||
{
|
{
|
||||||
memset(BitMapHeader->Buffer,
|
memset(BitMapHeader->Buffer,
|
||||||
0xFF,
|
0xFF,
|
||||||
ALIGN(BitMapHeader->SizeOfBitMap, 8) / 8);
|
ROUND_UP(BitMapHeader->SizeOfBitMap, 8) / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue