summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-12-15 05:12:21 +0200
committerunknown <monty@hundin.mysql.fi>2001-12-15 05:12:21 +0200
commit63e4dec2446382bf0331d2c483daee665064b925 (patch)
tree5b07ad850f8dba78d186135337dd5a151d18a2b8 /include/my_bitmap.h
parent6a5f89c9b190b0f26fc0cb12595126cba2659f32 (diff)
parentf8b4629cf728072b230159718994f585145b4ce2 (diff)
downloadmariadb-git-63e4dec2446382bf0331d2c483daee665064b925.tar.gz
Merge with 3.23.47
extra/resolve_stack_dump.c: Auto merged include/my_bitmap.h: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/dict/dict0crea.c: Auto merged mysql-test/t/rpl_get_lock.test: Auto merged
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 11df10f26a1..ca0037addfb 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -25,6 +25,12 @@ typedef struct st_bitmap
{
uchar *bitmap;
uint bitmap_size;
+ my_bool thread_safe; /* set if several threads access the bitmap */
+ /*
+ mutex will be acquired for the duration of each bitmap operation if
+ thread_safe flag is set. Otherwise, we optimize by not acquiring the
+ mutex
+ */
#ifdef THREAD
pthread_mutex_t mutex;
#endif
@@ -33,10 +39,14 @@ typedef struct st_bitmap
#ifdef __cplusplus
extern "C" {
#endif
- extern my_bool bitmap_init(MY_BITMAP *bitmap, uint bitmap_size);
+ extern my_bool bitmap_init(MY_BITMAP *bitmap, uint bitmap_size,
+ my_bool thread_safe);
extern void bitmap_free(MY_BITMAP *bitmap);
extern void bitmap_set_bit(MY_BITMAP *bitmap, uint bitmap_bit);
extern uint bitmap_set_next(MY_BITMAP *bitmap);
+ extern void bitmap_set_all(MY_BITMAP* bitmap);
+ extern my_bool bitmap_is_set(MY_BITMAP* bitmap, uint bitmap_bit);
+ extern void bitmap_clear_all(MY_BITMAP* bitmap);
extern void bitmap_clear_bit(MY_BITMAP *bitmap, uint bitmap_bit);
#ifdef __cplusplus
}