_vm_radix.h revision 248134
1246423Sattilio/* 2248134Salc * Copyright (c) 2013 EMC Corp. 3246423Sattilio * Copyright (c) 2011 Jeffrey Roberson <jeff@freebsd.org> 4246423Sattilio * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com> 5246423Sattilio * All rights reserved. 6246423Sattilio * 7246423Sattilio * Redistribution and use in source and binary forms, with or without 8246423Sattilio * modification, are permitted provided that the following conditions 9246423Sattilio * are met: 10246423Sattilio * 1. Redistributions of source code must retain the above copyright 11246423Sattilio * notice, this list of conditions and the following disclaimer. 12246423Sattilio * 2. Redistributions in binary form must reproduce the above copyright 13246423Sattilio * notice, this list of conditions and the following disclaimer in the 14246423Sattilio * documentation and/or other materials provided with the distribution. 15246423Sattilio * 16246423Sattilio * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17246423Sattilio * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18246423Sattilio * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19246423Sattilio * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20246423Sattilio * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21246423Sattilio * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22246423Sattilio * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23246423Sattilio * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24246423Sattilio * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25246423Sattilio * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26246423Sattilio * SUCH DAMAGE. 27246423Sattilio * 28246423Sattilio */ 29246423Sattilio 30246423Sattilio#ifndef __VM_RADIX_H_ 31246423Sattilio#define __VM_RADIX_H_ 32246423Sattilio 33246423Sattilio/* 34246478Sattilio * Radix tree root. 35246423Sattilio */ 36246423Sattiliostruct vm_radix { 37246478Sattilio uintptr_t rt_root; 38246423Sattilio}; 39246423Sattilio 40248134Salcstatic __inline boolean_t 41248134Salcvm_radix_is_empty(struct vm_radix *rtree) 42248134Salc{ 43248134Salc 44248134Salc return (rtree->rt_root == 0); 45248134Salc} 46248134Salc 47246423Sattilio#endif /* !__VM_RADIX_H_ */ 48