Lines Matching defs:resource
1401 * Initialize the resource structure. init() returns a handle to be used
1402 * for the rest of the resource functions. This code is written assuming
1417 /* alloc space for resource structure */
1432 /* Initialize resource structure */
1477 * alloc a resource. If alloc fails, we are out of resources.
1480 xpvtap_rs_alloc(xpvtap_rs_hdl_t handle, uint_t *resource)
1492 ASSERT(resource != NULL);
1501 * Find a free resource. This will return out of the loop once it finds
1502 * a free resource. There are a total of 'max'-'min'+1 resources.
1511 /* if the next resource to check is free */
1513 /* we are using this resource */
1514 *resource = rstruct->rs_last;
1521 * next resource on the next alloc(). Note the rollover
1529 /* unlock the resource structure */
1536 * This resource is not free, lets go to the next one. Note the
1553 * Free the previously alloc'd resource. Once a resource has been free'd,
1557 xpvtap_rs_free(xpvtap_rs_hdl_t handle, uint_t resource)
1567 ASSERT(resource >= rstruct->rs_min);
1568 ASSERT(resource <= rstruct->rs_max);
1574 /* Put the resource back in the free list */
1575 array_idx = resource >> 6;
1576 offset = resource & 0x3F;
1621 /* if the next resource to check is not free */