From 01aad2697e36a09a93fa18833b39bcc0486de567 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Tue, 10 Jun 2014 05:45:07 +0000 Subject: 14197 Implement id_space as a library Reviewed by: Yuri Pankov Reviewed by: Andy Fiddaman Approved by: Rich Lowe --- usr/src/common/idspace/id_space.c | 184 +++++++++++++++++++++++++++++ usr/src/lib/Makefile | 3 + usr/src/lib/libidspace/Makefile | 44 +++++++ usr/src/lib/libidspace/Makefile.com | 37 ++++++ usr/src/lib/libidspace/amd64/Makefile | 19 +++ usr/src/lib/libidspace/common/libidspace.c | 25 ++++ usr/src/lib/libidspace/common/libidspace.h | 42 +++++++ usr/src/lib/libidspace/common/mapfile-vers | 43 +++++++ usr/src/lib/libidspace/i386/Makefile | 18 +++ usr/src/pkg/manifests/system-library.mf | 2 + usr/src/uts/common/Makefile.rules | 6 +- usr/src/uts/common/os/id_space.c | 159 ------------------------- usr/src/uts/common/sys/id_space.h | 5 +- 13 files changed, 423 insertions(+), 164 deletions(-) create mode 100644 usr/src/common/idspace/id_space.c create mode 100644 usr/src/lib/libidspace/Makefile create mode 100644 usr/src/lib/libidspace/Makefile.com create mode 100644 usr/src/lib/libidspace/amd64/Makefile create mode 100644 usr/src/lib/libidspace/common/libidspace.c create mode 100644 usr/src/lib/libidspace/common/libidspace.h create mode 100644 usr/src/lib/libidspace/common/mapfile-vers create mode 100644 usr/src/lib/libidspace/i386/Makefile delete mode 100644 usr/src/uts/common/os/id_space.c (limited to 'usr') diff --git a/usr/src/common/idspace/id_space.c b/usr/src/common/idspace/id_space.c new file mode 100644 index 0000000000..7d28a8f533 --- /dev/null +++ b/usr/src/common/idspace/id_space.c @@ -0,0 +1,184 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#include +#include +#include + +/* + * ID Spaces + * + * The id_space_t provides a simple implementation of a managed range of + * integer identifiers using a vmem arena. An ID space guarantees that the + * next identifer returned by an allocation is larger than the previous one, + * unless there are no larger slots remaining in the range. In this case, + * the ID space will return the first available slot in the lower part of the + * range (viewing the previous identifier as a partitioning element). If no + * slots are available, id_alloc()/id_allocff() will sleep until an + * identifier becomes available. Accordingly, id_space allocations must be + * initiated from contexts where sleeping is acceptable. id_alloc_nosleep()/ + * id_allocff_nosleep() will return -1 if no slots are available or if the + * system is low on memory. If id_alloc_nosleep() fails, callers should + * not try to extend the ID space. This is to avoid making a possible + * low-memory situation worse. + * + * As an ID space is designed for representing a range of id_t's, there + * is a preexisting maximal range: [0, MAXUID]. ID space requests outside + * that range will fail on a DEBUG kernel. The id_allocff*() functions + * return the first available id, and should be used when there is benefit + * to having a compact allocated range. + * + * (Presently, the id_space_t abstraction supports only direct allocations; ID + * reservation, in which an ID is allocated but placed in a internal + * dictionary for later use, should be added when a consuming subsystem + * arrives.) + * + * This code is also shared with userland. In userland, we don't have the same + * ability to have sleeping variants, so we effectively turn the normal + * versions without _nosleep into _nosleep. + */ + +#define ID_TO_ADDR(id) ((void *)(uintptr_t)(id + 1)) +#define ADDR_TO_ID(addr) ((id_t)((uintptr_t)addr - 1)) + +/* + * Create an arena to represent the range [low, high). + * Caller must be in a context in which VM_SLEEP is legal, + * for the kernel. Always VM_NOSLEEP in userland. + */ +id_space_t * +id_space_create(const char *name, id_t low, id_t high) +{ +#ifdef _KERNEL + int flag = VM_SLEEP; +#else + int flag = VM_NOSLEEP; +#endif + ASSERT(low >= 0); + ASSERT(low < high); + + return (vmem_create(name, ID_TO_ADDR(low), high - low, 1, + NULL, NULL, NULL, 0, flag | VMC_IDENTIFIER)); +} + +/* + * Destroy a previously created ID space. + * No restrictions on caller's context. + */ +void +id_space_destroy(id_space_t *isp) +{ + vmem_destroy(isp); +} + +void +id_space_extend(id_space_t *isp, id_t low, id_t high) +{ +#ifdef _KERNEL + int flag = VM_SLEEP; +#else + int flag = VM_NOSLEEP; +#endif + (void) vmem_add(isp, ID_TO_ADDR(low), high - low, flag); +} + +/* + * Allocate an id_t from specified ID space. + * Caller must be in a context in which VM_SLEEP is legal. + */ +id_t +id_alloc(id_space_t *isp) +{ +#ifdef _KERNEL + int flag = VM_SLEEP; +#else + int flag = VM_NOSLEEP; +#endif + return (ADDR_TO_ID(vmem_alloc(isp, 1, flag | VM_NEXTFIT))); +} + +/* + * Allocate an id_t from specified ID space. + * Returns -1 on failure (see module block comments for more information on + * failure modes). + */ +id_t +id_alloc_nosleep(id_space_t *isp) +{ + return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_NOSLEEP | VM_NEXTFIT))); +} + +/* + * Allocate an id_t from specified ID space using FIRSTFIT. + * Caller must be in a context in which VM_SLEEP is legal. + */ +id_t +id_allocff(id_space_t *isp) +{ +#ifdef _KERNEL + int flag = VM_SLEEP; +#else + int flag = VM_NOSLEEP; +#endif + return (ADDR_TO_ID(vmem_alloc(isp, 1, flag | VM_FIRSTFIT))); +} + +/* + * Allocate an id_t from specified ID space using FIRSTFIT + * Returns -1 on failure (see module block comments for more information on + * failure modes). + */ +id_t +id_allocff_nosleep(id_space_t *isp) +{ + return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_NOSLEEP | VM_FIRSTFIT))); +} + +/* + * Allocate a specific identifier if possible, returning the id if + * successful, or -1 on failure. + */ +id_t +id_alloc_specific_nosleep(id_space_t *isp, id_t id) +{ + void *minaddr = ID_TO_ADDR(id); + void *maxaddr = ID_TO_ADDR(id + 1); + + /* + * Note that even though we're vmem_free()ing this later, it + * should be OK, since there's no quantum cache. + */ + return (ADDR_TO_ID(vmem_xalloc(isp, 1, 1, 0, 0, + minaddr, maxaddr, VM_NOSLEEP))); +} + +/* + * Free a previously allocated ID. + * No restrictions on caller's context. + */ +void +id_free(id_space_t *isp, id_t id) +{ + vmem_free(isp, ID_TO_ADDR(id), 1); +} diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index 5fb3375db8..f1e6b21158 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -140,6 +140,7 @@ SUBDIRS += \ libgss \ libhotplug \ libidmap \ + libidspace \ libilb \ libima \ libinetsvc \ @@ -403,6 +404,7 @@ HDRSUBDIRS= \ libgen \ libgrubmgmt \ libidmap \ + libidspace \ libilb \ libima \ libinetsvc \ @@ -625,6 +627,7 @@ libfsmgt: libkstat libgrubmgmt: libdevinfo libzfs libfstyp libefi $(INTEL_BLD)libgrubmgmt: libfdisk libidmap: libavl libuutil +libidspace: libumem libinetsvc: libscf libinetutil: libsocket libinstzones: libzonecfg libcontract diff --git a/usr/src/lib/libidspace/Makefile b/usr/src/lib/libidspace/Makefile new file mode 100644 index 0000000000..feeca43d3a --- /dev/null +++ b/usr/src/lib/libidspace/Makefile @@ -0,0 +1,44 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2014 Joyent, Inc. All rights reserved. +# + +include ../Makefile.lib + +HDRS = libidspace.h +HDRDIR = common + +SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +all := TARGET = all +clean := TARGET = clean +clobber := TARGET = clobber +install := TARGET = install + +.KEEP_STATE: + +all clean clobber install: $(SUBDIRS) + +install: install_h $(SUBDIRS) + +install_h: $(ROOTHDRS) + +check: $(CHECKHDRS) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + +include ../Makefile.targ diff --git a/usr/src/lib/libidspace/Makefile.com b/usr/src/lib/libidspace/Makefile.com new file mode 100644 index 0000000000..b7314fc37b --- /dev/null +++ b/usr/src/lib/libidspace/Makefile.com @@ -0,0 +1,37 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2020 Joyent, Inc. +# + +LIBRARY = libidspace.a +VERS = .1 +OBJECTS = id_space.o \ + libidspace.o +COMDIR = $(SRC)/common/idspace + +include ../../Makefile.lib + +SRCDIR = ../common +LIBS = $(DYNLIB) + +LDLIBS += -lumem + +.KEEP_STATE: + +all: $(LIBS) + +include ../../Makefile.targ + +objs/%.o pics/%.o: $(COMDIR)/%.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) diff --git a/usr/src/lib/libidspace/amd64/Makefile b/usr/src/lib/libidspace/amd64/Makefile new file mode 100644 index 0000000000..e03ee6aac6 --- /dev/null +++ b/usr/src/lib/libidspace/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2014 Joyent, Inc. All rights reserved. +# + +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libidspace/common/libidspace.c b/usr/src/lib/libidspace/common/libidspace.c new file mode 100644 index 0000000000..7a9f8acd67 --- /dev/null +++ b/usr/src/lib/libidspace/common/libidspace.c @@ -0,0 +1,25 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2014, Joyent, Inc. + */ + +/* + * Wrappers around the common id_space code, for userland. + */ +#include + +id_t +id_alloc_specific(id_space_t *idp, id_t id) +{ + return (id_alloc_specific_nosleep(idp, id)); +} diff --git a/usr/src/lib/libidspace/common/libidspace.h b/usr/src/lib/libidspace/common/libidspace.h new file mode 100644 index 0000000000..bb8690f19c --- /dev/null +++ b/usr/src/lib/libidspace/common/libidspace.h @@ -0,0 +1,42 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2014 Joyent, Inc. All rights reserved. + */ + +#ifndef _LIBIDSPACE_H +#define _LIBIDSPACE_H + +/* + * libidspace public header + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef struct id_space id_space_t; + +extern id_space_t *id_space_create(const char *, id_t, id_t); +extern void id_space_destroy(id_space_t *); +extern void id_space_extend(id_space_t *, id_t, id_t); +extern id_t id_alloc(id_space_t *); +extern id_t id_alloc_specific(id_space_t *, id_t); +extern void id_free(id_space_t *, id_t); + +#ifdef __cplusplus +} +#endif + +#endif /* _LIBIDSPACE_H */ diff --git a/usr/src/lib/libidspace/common/mapfile-vers b/usr/src/lib/libidspace/common/mapfile-vers new file mode 100644 index 0000000000..a536d2490d --- /dev/null +++ b/usr/src/lib/libidspace/common/mapfile-vers @@ -0,0 +1,43 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2014 Joyent, Inc. All rights reserved. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION ILLUMOSprivate { + global: + id_alloc; + id_alloc_specific; + id_free; + id_space_create; + id_space_destroy; + id_space_extend; + local: + *; +}; + diff --git a/usr/src/lib/libidspace/i386/Makefile b/usr/src/lib/libidspace/i386/Makefile new file mode 100644 index 0000000000..73fc6a2070 --- /dev/null +++ b/usr/src/lib/libidspace/i386/Makefile @@ -0,0 +1,18 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2014 Joyent, Inc. All rights reserved. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/pkg/manifests/system-library.mf b/usr/src/pkg/manifests/system-library.mf index d7abc4228b..4c50a4dd9c 100644 --- a/usr/src/pkg/manifests/system-library.mf +++ b/usr/src/pkg/manifests/system-library.mf @@ -357,6 +357,7 @@ file path=usr/lib/$(ARCH64)/libform.so.1 file path=usr/lib/$(ARCH64)/libfstyp.so.1 file path=usr/lib/$(ARCH64)/libhotplug.so.1 file path=usr/lib/$(ARCH64)/libidmap.so.1 +file path=usr/lib/$(ARCH64)/libidspace.so.1 file path=usr/lib/$(ARCH64)/libike.so.1 file path=usr/lib/$(ARCH64)/libipmi.so.1 file path=usr/lib/$(ARCH64)/libipp.so.1 @@ -430,6 +431,7 @@ file path=usr/lib/libform.so.1 file path=usr/lib/libfstyp.so.1 file path=usr/lib/libhotplug.so.1 file path=usr/lib/libidmap.so.1 +file path=usr/lib/libidspace.so.1 file path=usr/lib/libike.so.1 file path=usr/lib/libinetsvc.so.1 file path=usr/lib/libipmi.so.1 diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules index 4e3221ac23..6bbede41f4 100644 --- a/usr/src/uts/common/Makefile.rules +++ b/usr/src/uts/common/Makefile.rules @@ -1503,6 +1503,11 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/vioblk/%.c $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/vioif/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) + +$(OBJS_DIR)/%.o: $(COMMONBASE)/idspace/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + # # krtld must refer to its own bzero/bcopy until the kernel is fully linked # @@ -1657,4 +1662,3 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/tpm/%.s $(OBJS_DIR)/bz2%.o: $(COMMONBASE)/bzip2/%.c $(COMPILE.c) -o $@ -I$(COMMONBASE)/bzip2 $< $(CTFCONVERT_O) - diff --git a/usr/src/uts/common/os/id_space.c b/usr/src/uts/common/os/id_space.c deleted file mode 100644 index 2dad0cb940..0000000000 --- a/usr/src/uts/common/os/id_space.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -#include -#include -#include - -/* - * ID Spaces - * - * The id_space_t provides a simple implementation of a managed range of - * integer identifiers using a vmem arena. An ID space guarantees that the - * next identifer returned by an allocation is larger than the previous one, - * unless there are no larger slots remaining in the range. In this case, - * the ID space will return the first available slot in the lower part of the - * range (viewing the previous identifier as a partitioning element). If no - * slots are available, id_alloc()/id_allocff() will sleep until an - * identifier becomes available. Accordingly, id_space allocations must be - * initiated from contexts where sleeping is acceptable. id_alloc_nosleep()/ - * id_allocff_nosleep() will return -1 if no slots are available or if the - * system is low on memory. If id_alloc_nosleep() fails, callers should - * not try to extend the ID space. This is to avoid making a possible - * low-memory situation worse. - * - * As an ID space is designed for representing a range of id_t's, there - * is a preexisting maximal range: [0, MAXUID]. ID space requests outside - * that range will fail on a DEBUG kernel. The id_allocff*() functions - * return the first available id, and should be used when there is benefit - * to having a compact allocated range. - * - * (Presently, the id_space_t abstraction supports only direct allocations; ID - * reservation, in which an ID is allocated but placed in a internal - * dictionary for later use, should be added when a consuming subsystem - * arrives.) - */ - -#define ID_TO_ADDR(id) ((void *)(uintptr_t)(id + 1)) -#define ADDR_TO_ID(addr) ((id_t)((uintptr_t)addr - 1)) - -/* - * Create an arena to represent the range [low, high). - * Caller must be in a context in which VM_SLEEP is legal. - */ -id_space_t * -id_space_create(const char *name, id_t low, id_t high) -{ - ASSERT(low >= 0); - ASSERT(low < high); - - return (vmem_create(name, ID_TO_ADDR(low), high - low, 1, - NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER)); -} - -/* - * Destroy a previously created ID space. - * No restrictions on caller's context. - */ -void -id_space_destroy(id_space_t *isp) -{ - vmem_destroy(isp); -} - -void -id_space_extend(id_space_t *isp, id_t low, id_t high) -{ - (void) vmem_add(isp, ID_TO_ADDR(low), high - low, VM_SLEEP); -} - -/* - * Allocate an id_t from specified ID space. - * Caller must be in a context in which VM_SLEEP is legal. - */ -id_t -id_alloc(id_space_t *isp) -{ - return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_SLEEP | VM_NEXTFIT))); -} - -/* - * Allocate an id_t from specified ID space. - * Returns -1 on failure (see module block comments for more information on - * failure modes). - */ -id_t -id_alloc_nosleep(id_space_t *isp) -{ - return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_NOSLEEP | VM_NEXTFIT))); -} - -/* - * Allocate an id_t from specified ID space using FIRSTFIT. - * Caller must be in a context in which VM_SLEEP is legal. - */ -id_t -id_allocff(id_space_t *isp) -{ - return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_SLEEP | VM_FIRSTFIT))); -} - -/* - * Allocate an id_t from specified ID space using FIRSTFIT - * Returns -1 on failure (see module block comments for more information on - * failure modes). - */ -id_t -id_allocff_nosleep(id_space_t *isp) -{ - return (ADDR_TO_ID(vmem_alloc(isp, 1, VM_NOSLEEP | VM_FIRSTFIT))); -} - -/* - * Allocate a specific identifier if possible, returning the id if - * successful, or -1 on failure. - */ -id_t -id_alloc_specific_nosleep(id_space_t *isp, id_t id) -{ - void *minaddr = ID_TO_ADDR(id); - void *maxaddr = ID_TO_ADDR(id + 1); - - /* - * Note that even though we're vmem_free()ing this later, it - * should be OK, since there's no quantum cache. - */ - return (ADDR_TO_ID(vmem_xalloc(isp, 1, 1, 0, 0, - minaddr, maxaddr, VM_NOSLEEP))); -} - -/* - * Free a previously allocated ID. - * No restrictions on caller's context. - */ -void -id_free(id_space_t *isp, id_t id) -{ - vmem_free(isp, ID_TO_ADDR(id), 1); -} diff --git a/usr/src/uts/common/sys/id_space.h b/usr/src/uts/common/sys/id_space.h index d56fcceb5a..46d25f207f 100644 --- a/usr/src/uts/common/sys/id_space.h +++ b/usr/src/uts/common/sys/id_space.h @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All Rights reserved. */ #ifndef _ID_SPACE_H @@ -34,8 +35,6 @@ extern "C" { #include #include -#ifdef _KERNEL - typedef vmem_t id_space_t; id_space_t *id_space_create(const char *, id_t, id_t); @@ -48,8 +47,6 @@ id_t id_allocff_nosleep(id_space_t *); id_t id_alloc_specific_nosleep(id_space_t *, id_t); void id_free(id_space_t *, id_t); -#endif /* _KERNEL */ - #ifdef __cplusplus } #endif -- cgit v1.2.3