Changeset 8b08cf3 in mainline
- Timestamp:
- 2006-06-03T14:56:15Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f16cb0
- Parents:
- 586262f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/adt/bitmap.c
r586262f r8b08cf3 67 67 void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits) 68 68 { 69 index_t i ;69 index_t i=0; 70 70 index_t aligned_start; 71 71 count_t lub; /* leading unaligned bits */ … … 79 79 amb = bits > lub ? bits - lub : 0; 80 80 tab = amb % 8; 81 82 if ( start + bits < aligned_start ) { 83 /* 84 * Set bits in the middle of byte 85 */ 86 bitmap->map[start / 8] |= ((1 << lub)-1) << (start&7); 87 return; 88 } 81 89 82 90 if (lub) { … … 109 117 void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits) 110 118 { 111 index_t i ;119 index_t i=0; 112 120 index_t aligned_start; 113 121 count_t lub; /* leading unaligned bits */ … … 121 129 amb = bits > lub ? bits - lub : 0; 122 130 tab = amb % 8; 131 132 if ( start + bits < aligned_start ) 133 { 134 /* 135 * Set bits in the middle of byte 136 */ 137 bitmap->map[start / 8] &= ~(((1 << lub)-1) << (start&7)); 138 return; 139 } 140 123 141 124 142 if (lub) {
Note:
See TracChangeset
for help on using the changeset viewer.