Lines Matching full:resources
61 * @num_res: the maximum number of resources it can assign
64 * assign up to the requested number of resources. Uses bit strings to track
65 * which resources have been assigned. This type of resmgr is intended to be
71 resmgr->resources = bit_alloc(num_res, M_ICE_RESMGR, M_NOWAIT);
72 if (resmgr->resources == NULL)
83 * @num_res: the maximum number of resources it can assign
108 * resources have been released.
113 if (resmgr->resources != NULL) {
117 bit_count(resmgr->resources, 0, resmgr->num_res, &set);
121 free(resmgr->resources, M_ICE_RESMGR);
122 resmgr->resources = NULL;
132 * ice_resmgr_assign_contiguous - Assign contiguous mapping of resources
135 * @num_res: the number of resources to assign
137 * Assign num_res number of contiguous resources into the idx mapping. On
148 bit_ffc_area(resmgr->resources, resmgr->num_res, num_res, &start);
154 bit_set(resmgr->resources, start + i);
162 * ice_resmgr_assign_scattered - Assign possibly scattered resources
165 * @num_res: the number of resources to assign
167 * Assign num_res number of resources into the idx_mapping. On success, idx
192 bit_ffc_at(resmgr->resources, index, resmgr->num_res, &index);
196 bit_set(resmgr->resources, index);
202 /* Release any resources we did assign up to this point. */
211 * @num_res: number of resources in the mapping
224 bit_clear(resmgr->resources, idx[i]);