FreeBSD ZFS
The Zettabyte File System
|
00001 /* 00002 * CDDL HEADER START 00003 * 00004 * The contents of this file are subject to the terms of the 00005 * Common Development and Distribution License (the "License"). 00006 * You may not use this file except in compliance with the License. 00007 * 00008 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 00009 * or http://www.opensolaris.org/os/licensing. 00010 * See the License for the specific language governing permissions 00011 * and limitations under the License. 00012 * 00013 * When distributing Covered Code, include this CDDL HEADER in each 00014 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 00015 * If applicable, add the following below this CDDL HEADER, with the 00016 * fields enclosed by brackets "[]" replaced with your own identifying 00017 * information: Portions Copyright [yyyy] [name of copyright owner] 00018 * 00019 * CDDL HEADER END 00020 */ 00021 /* 00022 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 00023 * Use is subject to license terms. 00024 */ 00025 00026 #ifndef _SYS_UNIQUE_H 00027 #define _SYS_UNIQUE_H 00028 00029 #pragma ident "%Z%%M% %I% %E% SMI" 00030 00031 #include <sys/zfs_context.h> 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00038 #define UNIQUE_BITS 56 00039 00040 void unique_init(void); 00041 void unique_fini(void); 00042 00047 uint64_t unique_create(void); 00048 00052 uint64_t unique_insert(uint64_t value); 00053 00057 void unique_remove(uint64_t value); 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 #endif /* _SYS_UNIQUE_H */