xref: /illumos-gate/usr/src/man/man3avl/avl_swap.3avl (revision b1e2e3fb17324e9ddf43db264a0c64da7756d9e6)
1.\"
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
5.\" 1.0 of the CDDL.
6.\"
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.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 07, 2015
15.Dt AVL_SWAP 3AVL
16.Os
17.Sh NAME
18.Nm avl_swap
19.Nd swap the entries in two AVL trees
20.Sh SYNOPSIS
21.Lb libavl
22.In sys/avl.h
23.Ft void
24.Fo avl_swap
25.Fa "avl_tree_t *tree1"
26.Fa "avl_tree_t *tree2"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn avl_swap
31function swaps the nodes in the AVL tree
32.Fa tree1
33with those in
34.Fa tree2 .
35The two trees must have hold identical kinds of data, the arguments
36passed to
37.Xr avl_create 3AVL
38must be identical.
39The behavior when they are not is undefined.
40.Sh EXAMPLES
41See the
42.Sy EXAMPLES
43section in
44.Xr libavl 3LIB .
45.Sh INTERFACE STABILITY
46.Sy Committed
47.Sh MT-Level
48See
49.Sx Locking
50in
51.Xr libavl 3LIB .
52.Sh SEE ALSO
53.Xr libavl 3LIB
54