Refactor some bitmap cpp logic.
This commit is contained in:
parent
b8823ab026
commit
20fad3430c
@ -20,7 +20,7 @@ typedef unsigned long bitmap_t;
|
|||||||
* force linear search, if we would have to call ffsl more than 2^3 times, use a
|
* force linear search, if we would have to call ffsl more than 2^3 times, use a
|
||||||
* tree instead.
|
* tree instead.
|
||||||
*/
|
*/
|
||||||
#if LG_RUN_MAXREGS - LG_BITMAP_GROUP_NBITS > 3
|
#if LG_BITMAP_MAXBITS - LG_BITMAP_GROUP_NBITS > 3
|
||||||
# define USE_TREE
|
# define USE_TREE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -78,8 +78,7 @@ typedef unsigned long bitmap_t;
|
|||||||
|
|
||||||
#else /* USE_TREE */
|
#else /* USE_TREE */
|
||||||
|
|
||||||
#define BITMAP_GROUPS_MAX \
|
#define BITMAP_GROUPS_MAX BITMAP_BITS2GROUPS(BITMAP_MAXBITS)
|
||||||
(ZU(1) << (LG_RUN_MAXREGS - LG_SIZEOF_BITMAP - LG_SIZEOF_BITMAP))
|
|
||||||
|
|
||||||
#endif /* USE_TREE */
|
#endif /* USE_TREE */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user