idr_replace — replace pointer for given id
void * idr_replace ( | struct idr * idr, |
void * ptr, | |
int id) ; |
struct idr * idr
idr handle
void * ptr
New pointer to associate with the ID
int id
Lookup key
Replace the pointer registered with an ID and return the old value.
This function can be called under the RCU read lock concurrently with
idr_alloc
and idr_remove
(as long as the ID being removed is not
the one being replaced!).