2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
15 .Dt AVL_DESTROY_NODES 3AVL
19 .Nd efficiently remove nodes from an AVL tree
25 .Fa "avl_tree_t *tree"
31 function is used to efficiently remove nodes from the AVL tree rooted at
36 function is called on an AVL tree, the only valid functions that may be
37 called on it are additional calls to
43 .Fn avl_destroy_nodes ,
44 callers must first initialize a value of type
48 and pass a pointer to it as the argument
50 This is an opaque value that will be used to maintain where to next
51 delete items from the tree.
52 Callers should never modify it after initializing it.
54 .Fn avl_destroy_nodes ,
56 will be updated and must be passed to subsequent calls to
57 .Fn avl_destroy_nodes .
61 is called, it will return a pointer to an object that had previously
62 been inserted into the tree, allowing a caller the opportunity to delete
68 pointer, then the tree is empty and the caller should proceed to call
69 .Xr avl_destroy 3AVL .
73 demonstrate the correct usage of this interface.
77 function will return a pointer to the object just removed from
82 is empty, it will return
89 .Sh INTERFACE STABILITY
97 .Xr avl_destroy 3AVL ,