Lines Matching defs:nodeid
30 * DDI nodeid management ...
45 * Allocating a nodeid won't cause memory allocation.
46 * Freeing a nodeid does cause memory allocation.
50 uint32_t nodeid;
161 if ((np->nodeid + np->count) == xp->nodeid) {
185 impl_ddi_alloc_nodeid(int *nodeid)
195 *nodeid = 0;
200 x = (int)((unsigned int)np->nodeid);
201 ++np->nodeid;
216 *nodeid = x;
223 uint32_t nodeid = (uint32_t)n;
239 * Insert nodeid in the appropriate place in our sorted available
246 if ((nodeid + 1) == np->nodeid) {
247 np->nodeid = nodeid;
257 if (nodeid == (np->nodeid + np->count)) {
267 if (nodeid < np->nodeid) {
268 fp->nodeid = nodeid;
274 if (nodeid < (np->nodeid + np->count))
276 "nodeid %x already free", n);
282 fp->nodeid = nodeid;
289 * Remove (take) nodeid n off of the available list.
298 uint32_t nodeid = (uint32_t)n;
307 * If this nodeid is not within the range of nodeids we
311 if ((nodeid < OUR_NODEID_MIN) || (nodeid > OUR_NODEID_MAX))
323 * Find nodeid in our list, if it exists, 'take' it.
330 if (nodeid < np->nodeid)
336 if ((nodeid) == np->nodeid) {
337 ++np->nodeid;
356 if (nodeid == (np->nodeid + np->count - 1)) {
367 * have to split np into two items, removing nodeid
370 if (nodeid < (np->nodeid + np->count - 1)) {
380 * Split np, removing nodeid from the middle of
384 fp->nodeid = np->nodeid;
385 fp->count = nodeid - np->nodeid;
386 np->nodeid = nodeid + 1;
389 ASSERT(np->nodeid == (fp->nodeid + fp->count + 1));
397 * Apparently the nodeid is not available ...
403 cmn_err(CE_CONT, "?impl_ddi_take_nodeid: nodeid %x may not "
404 "be unique\n", nodeid);