44#include <linux/kernel.h>
78#define DCL_IDR_SLOTS 64
86static inline void idr_init_base(
struct idr *
idr,
int base)
97static inline void idr_init(
struct idr *
idr)
99 idr_init_base(
idr, 0);
102static inline int idr_is_empty(
struct idr *
idr)
122 int (*
fn)(
int id,
void *p,
void *
data),
void *
data);
136static inline void idr_preload_end(
void)
146#define idr_for_each_entry(idr, entry, id) \
147 for (id = 0; ((entry) = idr_get_next((idr), &(id))) != NULL; id += 1U)
149#define DEFINE_IDA(name) struct ida name = { 0 }
177static inline int ida_alloc(
struct ida*
ida,
gfp_t gfp)
197static inline int ida_alloc_min(
struct ida*
ida,
unsigned int min,
gfp_t gfp)
210static inline int ida_alloc_max(
struct ida*
ida,
unsigned int max,
gfp_t gfp)
226static inline void ida_init(
struct ida*
ida)
231static inline void ida_destroy(
struct ida*
ida)
#define NULL
Definition actypes.h:561
void * fn
Definition audrv.c:980
struct i915_user_extension base
Definition i915_drm.h:0
void * idr_get_next(struct idr *idr, int *nextid)
void idr_preload(gfp_t gfp)
void idr_destroy(struct idr *idr)
void * idr_replace(struct idr *idr, void *ptr, unsigned long id)
void * idr_remove(struct idr *idr, unsigned long id)
#define DCL_IDR_SLOTS
Definition idr.h:78
int idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp)
void * idr_find(const struct idr *idr, unsigned long id)
int idr_for_each(const struct idr *idr, int(*fn)(int id, void *p, void *data), void *data)
void ida_alloc_range(void)
void * data
Definition kthread.h:30
unsigned int gfp_t
Definition kernel.h:56
#define min(a, b)
Definition minmax.h:24
#define max(a, b)
Definition minmax.h:28
unsigned int next_id
Definition idr.h:47
unsigned char used[DCL_IDR_SLOTS]
Definition idr.h:82
unsigned int base
Definition idr.h:83
void * slots[DCL_IDR_SLOTS]
Definition idr.h:81