vm_radix.h revision 246423
12224Sctornqvi/* 22224Sctornqvi * Copyright (c) 2011 Jeffrey Roberson <jeff@freebsd.org> 32224Sctornqvi * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com> 42224Sctornqvi * All rights reserved. 52224Sctornqvi * 62224Sctornqvi * Redistribution and use in source and binary forms, with or without 72224Sctornqvi * modification, are permitted provided that the following conditions 82224Sctornqvi * are met: 92224Sctornqvi * 1. Redistributions of source code must retain the above copyright 102224Sctornqvi * notice, this list of conditions and the following disclaimer. 112224Sctornqvi * 2. Redistributions in binary form must reproduce the above copyright 122224Sctornqvi * notice, this list of conditions and the following disclaimer in the 132224Sctornqvi * documentation and/or other materials provided with the distribution. 142224Sctornqvi * 152224Sctornqvi * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 162224Sctornqvi * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 172224Sctornqvi * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 182224Sctornqvi * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 192224Sctornqvi * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 202224Sctornqvi * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 212224Sctornqvi * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 222224Sctornqvi * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 232224Sctornqvi * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 242224Sctornqvi * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 252224Sctornqvi * SUCH DAMAGE. 262224Sctornqvi * 272224Sctornqvi */ 282224Sctornqvi 292224Sctornqvi#ifndef _VM_RADIX_H_ 302224Sctornqvi#define _VM_RADIX_H_ 312224Sctornqvi 322224Sctornqvi#include <vm/_vm_radix.h> 332224Sctornqvi 342224Sctornqvi#ifdef _KERNEL 352224Sctornqvi 362224Sctornqvivoid vm_radix_init(void); 372224Sctornqviint vm_radix_insert(struct vm_radix *, vm_pindex_t, void *); 382224Sctornqvivoid *vm_radix_lookup(struct vm_radix *, vm_pindex_t); 392224Sctornqvivoid *vm_radix_lookup_ge(struct vm_radix *, vm_pindex_t); 402224Sctornqvivoid *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t); 412224Sctornqvivoid vm_radix_reclaim_allnodes(struct vm_radix *); 422224Sctornqvivoid vm_radix_remove(struct vm_radix *, vm_pindex_t); 432224Sctornqvi 442224Sctornqvi#endif /* _KERNEL */ 452224Sctornqvi#endif /* !_VM_RADIX_H_ */ 462224Sctornqvi