AVL_UPDATE(3AVL) AVL Tree Library Functions AVL_UPDATE(3AVL)
NAME
avl_update,
avl_update_gt,
avl_update_lt - reinsert a node if its order
has changed
SYNOPSIS
AVL Tree Library (libavl, -lavl)
#include <sys/avl.h> boolean_t avl_update(
avl_tree_t *tree,
void *node);
boolean_t avl_update_gt(
avl_tree_t *tree,
void *node);
boolean_t avl_update_lt(
avl_tree_t *tree,
void *node);
DESCRIPTION
The
avl_update() function re-inserts
node into
tree only if its order
has changed relative to its nearest neighbors. To optimize
performance,
avl_update_lt() checks only the previous node and
avl_update_gt() checks only the next node. Use
avl_update_lt() and
avl_update_gt() only if you know the direction in which the order of
the node may change.
RETURN VALUES
The
avl_update(),
avl_update_lt() and
avl_update_gt() functions return
B_TRUE if it was necessary to relocate the node due its order having
changed relative to its nearest neighbors and
B_FALSE otherwise.
EXAMPLES
See the
EXAMPLES section in
libavl(3LIB).
INTERFACE STABILITY
CommittedMT-Level See
Locking in
libavl(3LIB).
SEE ALSO
libavl(3LIB)illumos January 27, 2024 illumos