Lines Matching refs:item
45 ddi_get_soft_state(void *state, int item) in ddi_get_soft_state() argument
50 ASSERT((ss != NULL) && (item >= 0)); in ddi_get_soft_state()
54 if (item < ss->n_items && ss->array != NULL) in ddi_get_soft_state()
55 ret = ss->array[item]; in ddi_get_soft_state()
97 ddi_soft_state_zalloc(void *state, int item) in ddi_soft_state_zalloc() argument
103 if ((state == NULL) || (item < 0)) in ddi_soft_state_zalloc()
120 if (item < ss->n_items && array[item] != NULL) { in ddi_soft_state_zalloc()
133 if (item >= ss->n_items) { in ddi_soft_state_zalloc()
155 while (new_n_items < (1 + item)) in ddi_soft_state_zalloc()
158 ASSERT(new_n_items >= (1 + item)); /* sanity check! */ in ddi_soft_state_zalloc()
177 ASSERT(array != NULL && item < ss->n_items && array[item] == NULL); in ddi_soft_state_zalloc()
179 array[item] = new_element; in ddi_soft_state_zalloc()
186 ddi_soft_state_free(void *state, int item) in ddi_soft_state_free() argument
206 } else if (item < 0 || item >= ss->n_items) { in ddi_soft_state_free()
208 msg, item, (ulong_t)ss->n_items - 1, "fake"); in ddi_soft_state_free()
209 } else if (array[item] != NULL) { in ddi_soft_state_free()
210 element = array[item]; in ddi_soft_state_free()
211 array[item] = NULL; in ddi_soft_state_free()
237 int item; in ddi_soft_state_fini() local
254 for (item = 0; item < ss->n_items; item++) in ddi_soft_state_fini()
255 ddi_soft_state_free(ss, item); in ddi_soft_state_fini()