Lines Matching refs:idx

38     uint32_t idx;
131 BY_INDEX(s)[e->idx % NBUCKETS] = e->index_next;
160 static struct idxset_entry* index_scan(pa_idxset *s, unsigned hash, uint32_t idx) {
166 if (e->idx == idx)
172 int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx) {
181 if (idx)
182 *idx = e->idx;
191 e->idx = s->current_index++;
200 hash = e->idx % NBUCKETS;
224 if (idx)
225 *idx = e->idx;
230 void* pa_idxset_get_by_index(pa_idxset*s, uint32_t idx) {
236 hash = idx % NBUCKETS;
238 if (!(e = index_scan(s, hash, idx)))
244 void* pa_idxset_get_by_data(pa_idxset*s, const void *p, uint32_t *idx) {
255 if (idx)
256 *idx = e->idx;
261 void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) {
268 hash = idx % NBUCKETS;
270 if (!(e = index_scan(s, hash, idx)))
279 void* pa_idxset_remove_by_data(pa_idxset*s, const void *data, uint32_t *idx) {
293 if (idx)
294 *idx = e->idx;
314 void* pa_idxset_rrobin(pa_idxset *s, uint32_t *idx) {
319 pa_assert(idx);
321 hash = *idx % NBUCKETS;
323 e = index_scan(s, hash, *idx);
333 *idx = e->idx;
337 void *pa_idxset_iterate(pa_idxset *s, void **state, uint32_t *idx) {
356 if (idx)
357 *idx = e->idx;
364 if (idx)
365 *idx = PA_IDXSET_INVALID;
370 void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx) {
380 if (idx)
381 *idx = s->iterate_list_head->idx;
388 void* pa_idxset_first(pa_idxset *s, uint32_t *idx) {
392 if (idx)
393 *idx = PA_IDXSET_INVALID;
397 if (idx)
398 *idx = s->iterate_list_head->idx;
403 void *pa_idxset_next(pa_idxset *s, uint32_t *idx) {
408 pa_assert(idx);
410 if (*idx == PA_IDXSET_INVALID)
413 hash = *idx % NBUCKETS;
415 if ((e = index_scan(s, hash, *idx))) {
420 *idx = e->idx;
423 *idx = PA_IDXSET_INVALID;
432 for ((*idx)++; *idx < s->current_index; (*idx)++) {
434 hash = *idx % NBUCKETS;
436 if ((e = index_scan(s, hash, *idx))) {
437 *idx = e->idx;
442 *idx = PA_IDXSET_INVALID;