Deleted Added
full compact
rbt.h (135446) rbt.h (143731)
1/*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2002 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
1/*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2002 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* $Id: rbt.h,v 1.55.12.5 2004/03/08 09:04:38 marka Exp $ */
18/* $Id: rbt.h,v 1.55.12.6 2004/10/11 05:55:51 marka Exp $ */
19
20#ifndef DNS_RBT_H
21#define DNS_RBT_H 1
22
23#include <isc/lang.h>
24#include <isc/magic.h>
25
26#include <dns/types.h>

--- 571 unchanged lines hidden (view full) ---

598 * rbt is a valid rbt manager.
599 */
600
601void
602dns_rbt_destroy(dns_rbt_t **rbtp);
603isc_result_t
604dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
605/*
19
20#ifndef DNS_RBT_H
21#define DNS_RBT_H 1
22
23#include <isc/lang.h>
24#include <isc/magic.h>
25
26#include <dns/types.h>

--- 571 unchanged lines hidden (view full) ---

598 * rbt is a valid rbt manager.
599 */
600
601void
602dns_rbt_destroy(dns_rbt_t **rbtp);
603isc_result_t
604dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
605/*
606 * Stop working with a red-black tree of trees. Once dns_rbt_destroy2()
607 * has been called on a 'rbt' only dns_rbt_destroy() or dns_rbt_destroy2()
608 * may be used on the tree. If 'quantum' is zero then the entire tree will
609 * be destroyed.
610 *
606 * Stop working with a red-black tree of trees.
607 * If 'quantum' is zero then the entire tree will be destroyed.
608 * If 'quantum' is non zero then up to 'quantum' nodes will be destroyed
609 * allowing the rbt to be incrementally destroyed by repeated calls to
610 * dns_rbt_destroy2(). Once dns_rbt_destroy2() has been called no other
611 * operations than dns_rbt_destroy()/dns_rbt_destroy2() should be
612 * performed on the tree of trees.
613 *
611 * Requires:
612 * *rbt is a valid rbt manager.
613 *
614 * Requires:
615 * *rbt is a valid rbt manager.
616 *
614 * Ensures:
617 * Ensures on ISC_R_SUCCESS:
615 * All space allocated by the RBT library has been returned.
616 *
617 * *rbt is invalidated as an rbt manager.
618 *
619 * Returns:
620 * ISC_R_SUCCESS
621 * ISC_R_QUOTA if 'quantum' nodes have been destroyed.
622 */

--- 213 unchanged lines hidden ---
618 * All space allocated by the RBT library has been returned.
619 *
620 * *rbt is invalidated as an rbt manager.
621 *
622 * Returns:
623 * ISC_R_SUCCESS
624 * ISC_R_QUOTA if 'quantum' nodes have been destroyed.
625 */

--- 213 unchanged lines hidden ---