idr_replace
Prev | idr/ida Functions | Next

## Name

idr_replace — replace pointer for given id

## Synopsis

`void * idr_replace (` | struct idr * idp,
| void * ptr,
| int id`)`;

## Arguments

`idp`

  idr handle

`ptr`

  pointer you want associated with the id

`id`

  lookup key

## Description

Replace the pointer registered with an id and return the old value. A `-ENOENT` return indicates that `id` was not found. A `-EINVAL` return indicates that `id` was not within valid constraints.

The caller must serialize with writers.

Prev | Up | Next
idr_get_next | Home | idr_init