summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2001-02-07 17:42:20 +0200
committermonty@donna.mysql.com <>2001-02-07 17:42:20 +0200
commitd487e5a9b1702ffaeb7afd8656cd811be1493576 (patch)
tree513c37217d346353220e5bf7b3bcccd9e135c596 /include/my_bitmap.h
parentcc9f24bc40220c38d40b064e4b07c4192ee9a8b8 (diff)
downloadmariadb-git-d487e5a9b1702ffaeb7afd8656cd811be1493576.tar.gz
Use new bitmap interface
Patches for Armstrong Removed warnings when using REPAIR TABLE .. EXTENDED
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 6c86a79fe45..370f45576ff 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -18,18 +18,29 @@
#ifndef _my_bitmap_h_
#define _my_bitmap_h_
-#define MY_BIT_NONE ~(uint)0
+#include <my_pthread.h>
+
+#define MY_BIT_NONE (~(uint) 0)
+
+typedef struct st_bitmap
+{
+ uchar *bitmap;
+ uint bitmap_size;
+#ifdef THREAD
+ pthread_mutex_t mutex;
+#endif
+} BITMAP;
#ifdef __cplusplus
extern "C" {
#endif
-
- extern void bitmap_set_bit(uchar *bitmap, uint bitmap_size, uint bitmap_bit);
- extern uint bitmap_set_next(uchar *bitmap, uint bitmap_size);
- extern void bitmap_clear_bit(uchar *bitmap,uint bitmap_size,uint bitmap_bit);
-
+ extern my_bool bitmap_init(BITMAP *bitmap, uint bitmap_size);
+ extern void bitmap_free(BITMAP *bitmap);
+ extern void bitmap_set_bit(BITMAP *bitmap, uint bitmap_bit);
+ extern uint bitmap_set_next(BITMAP *bitmap);
+ extern void bitmap_clear_bit(BITMAP *bitmap, uint bitmap_bit);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* _my_bitmap_h_ */