summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authormonty@mishka.local <>2004-05-16 14:48:32 +0300
committermonty@mishka.local <>2004-05-16 14:48:32 +0300
commit314a8bf1148adc35263971a674333c02a8081b93 (patch)
tree318557f2fbc33b547d96f62b2544f2e9f4174082 /include/my_bitmap.h
parent565aa085a7b398d1ae6e06e628d8e43f052bba9d (diff)
downloadmariadb-git-314a8bf1148adc35263971a674333c02a8081b93.tar.gz
key_cmp -> key_cmp_if_same
New records_in_range() interface (similar to read_range()) Macros for faster bitmap handling Simplify read_range() code (#WL1786) New general key_cmp() function to compare keys
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 5b3da011f54..a4511bf3414 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -55,6 +55,12 @@ extern void bitmap_set_bit(MY_BITMAP *map, uint bitmap_bit);
extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size);
extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2);
extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2);
+
+/* Fast, not thread safe, bitmap functions */
+#define bitmap_fast_set_bit(MAP, BIT) (MAP)->bitmap[(BIT) / 8] |= (1 << ((BIT) & 7))
+#define bitmap_fast_clear_bit(MAP, BIT) (MAP)->bitmap[(BIT) / 8] &= ~ (1 << ((BIT) & 7))
+#define bitmap_fast_is_set(MAP, BIT) (MAP)->bitmap[(BIT) / 8] & (1 << ((BIT) & 7))
+
#ifdef __cplusplus
}
#endif