Lines Matching defs:resource
41 * Bounds of resource allocation. We will start allocating at rs_min
49 * rs_free points to an array of 64-bit values used to track resource
56 * last tracks the last alloc'd resource. This allows us to do a round
67 * Initialize the resource structure. This structure will be protected
69 * used for the rest of the resource functions. This code is written assuming
85 /* alloc space for resource structure */
100 /* Initialize resource structure */
145 * alloc a resource. If alloc fails, we are out of resources.
148 ioat_rs_alloc(ioat_rs_hdl_t handle, uint_t *resource)
160 ASSERT(resource != NULL);
169 * Find a free resource. This will return out of the loop once it finds
170 * a free resource. There are a total of 'max'-'min'+1 resources.
179 /* if the next resource to check is free */
181 /* we are using this resource */
182 *resource = rstruct->rs_last;
189 * next resource on the next alloc(). Note the rollover
197 /* unlock the resource structure */
204 * This resource is not free, lets go to the next one. Note the
221 * Free the previously alloc'd resource. Once a resource has been free'd,
225 ioat_rs_free(ioat_rs_hdl_t handle, uint_t resource)
235 ASSERT(resource >= rstruct->rs_min);
236 ASSERT(resource <= rstruct->rs_max);
240 /* Put the resource back in the free list */
241 array_idx = resource >> 6;
242 offset = resource & 0x3F;