1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
#
# 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
# Hammerhead: amd64-only
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
#
# 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: $(COMDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(COMDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
#
# 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)
/*
* 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 <sys/id_space.h>
id_t
id_alloc_specific(id_space_t *idp, id_t id)
{
return (id_alloc_specific_nosleep(idp, id));
}
/*
* 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.
* Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
*/
#ifndef _LIBIDSPACE_H
#define _LIBIDSPACE_H
/*
* libidspace public header
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/types.h>
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_allocff(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 */
#
# 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.
# Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
#
#
# 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_allocff;
id_alloc_specific;
id_free;
id_space_create;
id_space_destroy;
id_space_extend;
local:
*;
};
|