Lines Matching defs:id
56 struct idr_free_id *id;
59 id = range->free_ids;
61 kmem_free(id, sizeof(struct idr_free_id));
85 struct idr_free_id *id, **pid;
106 /* link free id to the new range */
109 if ((*pid)->id < start) {
113 id = *pid;
116 (*pid) = id->next;
119 id->next = n->free_ids;
120 n->free_ids = id;
133 if (pa->id < pb->id)
135 else if (pa->id > pb->id)
145 int id;
150 id = idp->id;
152 return (id);
156 id = range->min_unused_id;
158 return (id);
179 int id;
189 id = idr_get_free_id_in_range(range);
190 if (id >= 0)
204 used->id = id;
208 *newid = id;
214 idr_find_used_id(struct idr *idrp, uint32_t id)
219 match.id = id;
230 idr_find(struct idr *idrp, uint32_t id)
235 ret = idr_find_used_id(idrp, id);
246 idr_remove(struct idr *idrp, uint32_t id)
253 ide = idr_find_used_id(idrp, id);
264 fid->id = id;
268 while (range->end <= id)
287 idr_replace(struct idr *idrp, void *obj, uint32_t id)
292 ide = idr_find_used_id(idrp, id);
305 idr_for_each(struct idr *idrp, int (*fn)(int id, void *p, void *data), void *data)
312 ret = fn(ide->id, ide->obj, data);
377 int key, id;
381 id = ++fr_id;
382 if (id == 0x7fffffff) {
384 id = fr_id = 1;
387 /* find available id */
389 obj_temp = idr_list_find(head, id);
390 } while ((obj_temp != NULL) && (++id < 0x7fffffff));
391 if (id < 0x7fffffff) {
392 fr_id = id;
401 ASSERT(id <= 0x7fffffff);
402 key = id % DRM_GEM_OBJIDR_HASHNODE;
404 entry->handle = id;
414 *handlep = id;