1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright (c) 2014 Joyent, Inc. All rights reserved. 14 * Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 15 */ 16 17 #ifndef _LIBIDSPACE_H 18 #define _LIBIDSPACE_H 19 20 /* 21 * libidspace public header 22 */ 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 #include <sys/types.h> 29 30 typedef struct id_space id_space_t; 31 32 extern id_space_t *id_space_create(const char *, id_t, id_t); 33 extern void id_space_destroy(id_space_t *); 34 extern void id_space_extend(id_space_t *, id_t, id_t); 35 extern id_t id_alloc(id_space_t *); 36 extern id_t id_allocff(id_space_t *); 37 extern id_t id_alloc_specific(id_space_t *, id_t); 38 extern void id_free(id_space_t *, id_t); 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* _LIBIDSPACE_H */ 45