diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:19:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:20:17 +0000 |
commit | a64a253794ac64cb40befee54db53bde17dd0d49 (patch) | |
tree | c1024acc5f6e508814b944d99f112259bb28b1be /libnetdata/avl/avl.h | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip |
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | libnetdata/avl/avl.h (renamed from src/avl.h) | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/avl.h b/libnetdata/avl/avl.h index 19648cd1d..070bb3d3d 100644 --- a/src/avl.h +++ b/libnetdata/avl/avl.h @@ -1,7 +1,10 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later #ifndef _AVL_H #define _AVL_H 1 +#include "../libnetdata.h" + /* Maximum AVL tree height. */ #ifndef AVL_MAX_HEIGHT #define AVL_MAX_HEIGHT 92 @@ -56,31 +59,31 @@ typedef struct avl_tree_lock { * a is linked directly to the tree, so it has to * be properly allocated by the caller. */ -avl *avl_insert_lock(avl_tree_lock *t, avl *a) NEVERNULL WARNUNUSED; -avl *avl_insert(avl_tree *t, avl *a) NEVERNULL WARNUNUSED; +avl *avl_insert_lock(avl_tree_lock *tree, avl *item) NEVERNULL WARNUNUSED; +avl *avl_insert(avl_tree *tree, avl *item) NEVERNULL WARNUNUSED; /* Remove an element a from the AVL tree t * returns a pointer to the removed element * or NULL if an element equal to a is not found * (equal as returned by t->compar()) */ -avl *avl_remove_lock(avl_tree_lock *t, avl *a) WARNUNUSED; -avl *avl_remove(avl_tree *t, avl *a) WARNUNUSED; +avl *avl_remove_lock(avl_tree_lock *tree, avl *item) WARNUNUSED; +avl *avl_remove(avl_tree *tree, avl *item) WARNUNUSED; /* Find the element into the tree that equal to a * (equal as returned by t->compar()) * returns NULL is no element is equal to a */ -avl *avl_search_lock(avl_tree_lock *t, avl *a); -avl *avl_search(avl_tree *t, avl *a); +avl *avl_search_lock(avl_tree_lock *tree, avl *item); +avl *avl_search(avl_tree *tree, avl *item); /* Initialize the avl_tree_lock */ -void avl_init_lock(avl_tree_lock *t, int (*compar)(void *a, void *b)); -void avl_init(avl_tree *t, int (*compar)(void *a, void *b)); +void avl_init_lock(avl_tree_lock *tree, int (*compar)(void *a, void *b)); +void avl_init(avl_tree *tree, int (*compar)(void *a, void *b)); -int avl_traverse_lock(avl_tree_lock *t, int (*callback)(void *entry, void *data), void *data); -int avl_traverse(avl_tree *t, int (*callback)(void *entry, void *data), void *data); +int avl_traverse_lock(avl_tree_lock *tree, int (*callback)(void *entry, void *data), void *data); +int avl_traverse(avl_tree *tree, int (*callback)(void *entry, void *data), void *data); #endif /* avl.h */ |