!23 修复LOS_BitmapSetNBits误将位数当作位模式的错误
Merge pull request !23 from laokz/bitmap
This commit is contained in:
commit
67a9c7b8b5
|
@ -158,7 +158,7 @@ extern "C" {
|
|||
#define MMU_DESCRIPTOR_L2_AP01_0 (MMU_DESCRIPTOR_L2_AP01(0))
|
||||
#define MMU_DESCRIPTOR_L2_AP01_1 (MMU_DESCRIPTOR_L2_AP01(1))
|
||||
#define MMU_DESCRIPTOR_L2_AP01_3 (MMU_DESCRIPTOR_L2_AP01(3))
|
||||
#define MMU_DESCRIPTOR_L2_AP_P_NA_U_NA (MMUDESCRIPTOR_L2_AP2_0 | MMU_DESCRIPTOR_L2_AP01_0)
|
||||
#define MMU_DESCRIPTOR_L2_AP_P_NA_U_NA (MMU_DESCRIPTOR_L2_AP2_0 | MMU_DESCRIPTOR_L2_AP01_0)
|
||||
#define MMU_DESCRIPTOR_L2_AP_P_RW_U_RW (MMU_DESCRIPTOR_L2_AP2_0 | MMU_DESCRIPTOR_L2_AP01_3)
|
||||
#define MMU_DESCRIPTOR_L2_AP_P_RW_U_NA (MMU_DESCRIPTOR_L2_AP2_0 | MMU_DESCRIPTOR_L2_AP01_1)
|
||||
#define MMU_DESCRIPTOR_L2_AP_P_RO_U_RO (MMU_DESCRIPTOR_L2_AP2_1 | MMU_DESCRIPTOR_L2_AP01_3)
|
||||
|
|
|
@ -92,7 +92,7 @@ VOID LOS_BitmapSetNBits(UINTPTR *bitmap, UINT32 start, UINT32 numsSet)
|
|||
UINTPTR maskToSet = BITMAP_FIRST_WORD_MASK(start);
|
||||
|
||||
while (numsSet > bitsToSet) {
|
||||
*p |= bitsToSet;
|
||||
*p |= maskToSet;
|
||||
numsSet -= bitsToSet;
|
||||
bitsToSet = BITMAP_BITS_PER_WORD;
|
||||
maskToSet = OS_BITMAP_WORD_MASK;
|
||||
|
|
Loading…
Reference in New Issue