The library is idrused in the kernel to control the assignment of whole identifiers to objects and search for objects by identifier. See this article with the LWN net article for a complete reference; The basic idea is that you have the following operations:
idr_get_new(struct idr *idp, void *ptr, int *id)- assign a new identifier for the pointer ptrand return it viaid
void *idr_find(struct idr *idp, int id) - return the pointer corresponding id
void idr_remove(struct idr *idp, int id) - id
, , - , , .