fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee * Common Development and Distribution License (the "License").
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
2a12f85ad140e332791b4bad1208a734c3f26bf3Jeremy Jones/*
2a12f85ad140e332791b4bad1208a734c3f26bf3Jeremy Jones * Copyright (c) 2013 by Delphix. All rights reserved.
2a12f85ad140e332791b4bad1208a734c3f26bf3Jeremy Jones */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifndef _MDB_AVL_H
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define _MDB_AVL_H
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifdef __cplusplus
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define AVL_WALK_NAME "avl"
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define AVL_WALK_DESC "given any avl_tree_t *, forward walk all " \
fa9e4066f08beec538e775443c5be79dd423fcabahrens "entries in tree"
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern int avl_walk_init(mdb_walk_state_t *);
b5fca8f855054d167d04d3b4de5210c83ed2083ctomeeextern int avl_walk_init_named(mdb_walk_state_t *wsp,
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee const char *, const char *);
b5fca8f855054d167d04d3b4de5210c83ed2083ctomeeextern int avl_walk_init_checked(mdb_walk_state_t *wsp,
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee const char *, const char *,
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee int (*)(void *, uintptr_t, void *), void *);
b5fca8f855054d167d04d3b4de5210c83ed2083ctomeeextern int avl_walk_init_range(mdb_walk_state_t *wsp, uintptr_t, uintptr_t,
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee const char *, const char *,
b5fca8f855054d167d04d3b4de5210c83ed2083ctomee int (*)(void *, uintptr_t, void *), void *);
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern int avl_walk_step(mdb_walk_state_t *);
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern void avl_walk_fini(mdb_walk_state_t *wsp);
2a12f85ad140e332791b4bad1208a734c3f26bf3Jeremy Jonesextern int avl_walk_mdb(uintptr_t, mdb_walk_cb_t, void *);
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifdef __cplusplus
fa9e4066f08beec538e775443c5be79dd423fcabahrens}
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif /* _MDB_AVL_H */