xref: /titanic_51/usr/src/man/man3avl/avl_swap.3avl (revision 6a72db4a7fa12c3e0d1c1cf91a07390739fa0fbf)
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
38must be identical. The behavior when they are not is undefined.
39.Sh EXAMPLES
40See the
41.Sy EXAMPLES
42section in
43.Xr libavl 3LIB .
44.Sh INTERFACE STABILITY
45.Sy Committed
46.Sh MT-Level
47See
48.Sx Locking
49in
50.Xr libavl 3LIB .
51.Sh SEE ALSO
52.Xr libavl 3LIB
53