101aad269SRobert Mustacchi /* 201aad269SRobert Mustacchi * This file and its contents are supplied under the terms of the 301aad269SRobert Mustacchi * Common Development and Distribution License ("CDDL"), version 1.0. 401aad269SRobert Mustacchi * You may only use this file in accordance with the terms of version 501aad269SRobert Mustacchi * 1.0 of the CDDL. 601aad269SRobert Mustacchi * 701aad269SRobert Mustacchi * A full copy of the text of the CDDL should have accompanied this 801aad269SRobert Mustacchi * source. A copy of the CDDL is also available via the Internet at 901aad269SRobert Mustacchi * http://www.illumos.org/license/CDDL. 1001aad269SRobert Mustacchi */ 1101aad269SRobert Mustacchi 1201aad269SRobert Mustacchi /* 1301aad269SRobert Mustacchi * Copyright (c) 2014 Joyent, Inc. All rights reserved. 14*1aa1f41fSAndy Fiddaman * Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 1501aad269SRobert Mustacchi */ 1601aad269SRobert Mustacchi 1701aad269SRobert Mustacchi #ifndef _LIBIDSPACE_H 1801aad269SRobert Mustacchi #define _LIBIDSPACE_H 1901aad269SRobert Mustacchi 2001aad269SRobert Mustacchi /* 2101aad269SRobert Mustacchi * libidspace public header 2201aad269SRobert Mustacchi */ 2301aad269SRobert Mustacchi 2401aad269SRobert Mustacchi #ifdef __cplusplus 2501aad269SRobert Mustacchi extern "C" { 2601aad269SRobert Mustacchi #endif 2701aad269SRobert Mustacchi 2801aad269SRobert Mustacchi #include <sys/types.h> 2901aad269SRobert Mustacchi 3001aad269SRobert Mustacchi typedef struct id_space id_space_t; 3101aad269SRobert Mustacchi 3201aad269SRobert Mustacchi extern id_space_t *id_space_create(const char *, id_t, id_t); 3301aad269SRobert Mustacchi extern void id_space_destroy(id_space_t *); 3401aad269SRobert Mustacchi extern void id_space_extend(id_space_t *, id_t, id_t); 3501aad269SRobert Mustacchi extern id_t id_alloc(id_space_t *); 36*1aa1f41fSAndy Fiddaman extern id_t id_allocff(id_space_t *); 3701aad269SRobert Mustacchi extern id_t id_alloc_specific(id_space_t *, id_t); 3801aad269SRobert Mustacchi extern void id_free(id_space_t *, id_t); 3901aad269SRobert Mustacchi 4001aad269SRobert Mustacchi #ifdef __cplusplus 4101aad269SRobert Mustacchi } 4201aad269SRobert Mustacchi #endif 4301aad269SRobert Mustacchi 4401aad269SRobert Mustacchi #endif /* _LIBIDSPACE_H */ 45