summaryrefslogtreecommitdiff
path: root/include/lf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lf.h')
-rw-r--r--include/lf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lf.h b/include/lf.h
index e4cad7eabb3..fa8c2d3570c 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()