XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Functions
idr.h File Reference
#include <linux/kernel.h>
Include dependency graph for idr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ida
 
struct  idr
 

Macros

#define DCL_IDR_SLOTS   64
 
#define idr_for_each_entry(idr, entry, id)    for (id = 0; ((entry) = idr_get_next((idr), &(id))) != NULL; id += 1U)
 
#define DEFINE_IDA(name)   struct ida name = { 0 }
 

Functions

void idr_preload (gfp_t gfp)
 
int idr_alloc (struct idr *idr, void *ptr, int start, int end, gfp_t gfp)
 
void * idr_remove (struct idr *idr, unsigned long id)
 
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 * idr_get_next (struct idr *idr, int *nextid)
 
void * idr_replace (struct idr *idr, void *ptr, unsigned long id)
 
void idr_destroy (struct idr *idr)
 
int ida_alloc_range (struct ida *ida, unsigned int min, unsigned int max, gfp_t gfp)
 
void ida_free (struct ida *ida, unsigned int id)
 

Macro Definition Documentation

◆ DCL_IDR_SLOTS

#define DCL_IDR_SLOTS   64

◆ DEFINE_IDA

#define DEFINE_IDA (   name)    struct ida name = { 0 }

◆ idr_for_each_entry

#define idr_for_each_entry (   idr,
  entry,
  id 
)     for (id = 0; ((entry) = idr_get_next((idr), &(id))) != NULL; id += 1U)

Function Documentation

◆ ida_alloc_range()

int ida_alloc_range ( struct ida *  ida,
unsigned int  min,
unsigned int  max,
gfp_t  gfp 
)
extern

◆ ida_free()

void ida_free ( struct ida *  ida,
unsigned int  id 
)
extern

◆ idr_alloc()

int idr_alloc ( struct idr *  idr,
void *  ptr,
int  start,
int  end,
gfp_t  gfp 
)

◆ idr_destroy()

void idr_destroy ( struct idr *  idr)

◆ idr_find()

void * idr_find ( const struct idr *  idr,
unsigned long  id 
)

◆ idr_for_each()

int idr_for_each ( const struct idr *  idr,
int(*)(int id, void *p, void *data)  fn,
void *  data 
)

◆ idr_get_next()

void * idr_get_next ( struct idr *  idr,
int *  nextid 
)

◆ idr_preload()

void idr_preload ( gfp_t  gfp)

◆ idr_remove()

void * idr_remove ( struct idr *  idr,
unsigned long  id 
)

◆ idr_replace()

void * idr_replace ( struct idr *  idr,
void *  ptr,
unsigned long  id 
)