diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-28 01:47:17 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-28 13:24:11 +0400 |
commit | dc90234bda3e2074179a3e54c09a7c9694e69965 (patch) | |
tree | 56511b90d36696d23153defeadda83e08a7a4d5b /include | |
parent | 830a7c67a4eefa1091bad4b60617309b9f299c96 (diff) | |
download | mariadb-git-dc90234bda3e2074179a3e54c09a7c9694e69965.tar.gz |
MDEV-17441 - InnoDB transition to C++11 atomics
Added lf_hash_size() macro, so that callers don't need to use atomic
operations.
Diffstat (limited to 'include')
-rw-r--r-- | include/lf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lf.h b/include/lf.h index a9d7e9ee688..fe861a524dc 100644 --- a/include/lf.h +++ b/include/lf.h @@ -167,6 +167,8 @@ void *lf_hash_search_using_hash_value(LF_HASH *hash, LF_PINS *pins, int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen); int lf_hash_iterate(LF_HASH *hash, LF_PINS *pins, my_hash_walk_action action, void *argument); +#define lf_hash_size(hash) \ + my_atomic_load32_explicit(&(hash)->count, MY_MEMORY_ORDER_RELAXED) /* shortcut macros to access underlying pinbox functions from an LF_HASH see lf_pinbox_get_pins() and lf_pinbox_put_pins() |