summaryrefslogtreecommitdiffstats
path: root/libnetdata/avl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libnetdata/avl/Makefile.am8
-rw-r--r--libnetdata/avl/README.md21
-rw-r--r--src/libnetdata/avl/avl.c (renamed from libnetdata/avl/avl.c)4
-rw-r--r--src/libnetdata/avl/avl.h (renamed from libnetdata/avl/avl.h)0
4 files changed, 2 insertions, 31 deletions
diff --git a/libnetdata/avl/Makefile.am b/libnetdata/avl/Makefile.am
deleted file mode 100644
index 161784b8f..000000000
--- a/libnetdata/avl/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-AUTOMAKE_OPTIONS = subdir-objects
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-
-dist_noinst_DATA = \
- README.md \
- $(NULL)
diff --git a/libnetdata/avl/README.md b/libnetdata/avl/README.md
deleted file mode 100644
index 94c0f634f..000000000
--- a/libnetdata/avl/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-title: "AVL"
-custom_edit_url: https://github.com/netdata/netdata/edit/master/libnetdata/avl/README.md
-sidebar_label: "AVL"
-learn_status: "Published"
-learn_topic_type: "Tasks"
-learn_rel_path: "Developers/libnetdata"
--->
-
-# AVL
-
-AVL is a library indexing objects in B-Trees.
-
-`avl_insert()`, `avl_remove()` and `avl_search()` are adaptations
-of the AVL algorithm found in `libavl` v2.0.3, so that they do not
-use any memory allocations and their memory footprint is optimized
-(by eliminating non-necessary data members).
-
-In addition to the above, this version of AVL, provides versions using locks
-and traversal functions.
-
diff --git a/libnetdata/avl/avl.c b/src/libnetdata/avl/avl.c
index eef4c3116..e1d4064dc 100644
--- a/libnetdata/avl/avl.c
+++ b/src/libnetdata/avl/avl.c
@@ -334,7 +334,7 @@ static inline void avl_write_lock(avl_tree_lock *t) {
static inline void avl_read_unlock(avl_tree_lock *t) {
#if defined(AVL_LOCK_WITH_RWLOCK)
- netdata_rwlock_unlock(&t->rwlock);
+ netdata_rwlock_rdunlock(&t->rwlock);
#else
rw_spinlock_read_unlock(&t->rwlock);
#endif
@@ -342,7 +342,7 @@ static inline void avl_read_unlock(avl_tree_lock *t) {
static inline void avl_write_unlock(avl_tree_lock *t) {
#if defined(AVL_LOCK_WITH_RWLOCK)
- netdata_rwlock_unlock(&t->rwlock);
+ netdata_rwlock_wrunlock(&t->rwlock);
#else
rw_spinlock_write_unlock(&t->rwlock);
#endif
diff --git a/libnetdata/avl/avl.h b/src/libnetdata/avl/avl.h
index 595d6ec6c..595d6ec6c 100644
--- a/libnetdata/avl/avl.h
+++ b/src/libnetdata/avl/avl.h