AVL(9F) Kernel Functions for Drivers AVL(9F)

avl, avl_add, avl_create, avl_destroy, avl_destroy_nodes, avl_find, avl_first, avl_insert, avl_insert_here, avl_is_empty, avl_last, avl_nearest, avl_numnodes, avl_remove, avl_swap, AVL_NEXT, AVL_PREV
AVL tree routines

AVL trees are a general purpose, self-balancing binary tree that can be used instead of the standard linked list interfaces -- list_create(9F). AVL trees are particularly useful either when order is important or better lookup performance is required.

The AVL tree interfaces are identical in both userland and the kernel. For more general information on AVL trees, see libavl(3LIB). For more information on any of the funtions defined here, please see the corresponding manual page in section 3AVL. Please note, that while the descriptions in those manual pages are accurate for writers of Device Drivers, the examples provided use scaffolding not available in the kernel, such as the use of malloc(), and need to be adapated.

All of the AVL routines may be used in user, kernel, and interrupt context.

See EXAMPLES in libavl(3LIB).

Committed

AVL trees do not inherently have any internal locking, it is up to the consumer to use locks as appropriate. See mutex(9F) and rwlock(9F) for more information on synchronization primitives.

avl_add(3AVL), avl_create(3AVL), avl_destroy(3AVL), avl_destroy_nodes(3AVL), avl_find(3AVL), avl_first(3AVL), avl_insert(3AVL), avl_insert_here(3AVL), avl_is_empty(3AVL), avl_last(3AVL), avl_nearest(3AVL), AVL_NEXT(3AVL), avl_numnodes(3AVL), AVL_PREV(3AVL), avl_remove(3AVL), avl_swap(3AVL), libavl(3LIB)

Writing Device Drivers.

March 13, 2016 OmniOS