Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Macros | Typedefs | Functions
mpool.h File Reference
#include <sys/queue.h>
#include <circ-queue.h>
Include dependency graph for mpool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _bkt
 
struct  MPOOL
 

Macros

#define HASHKEY(pgno)   ((pgno - 1) % HASHSIZE)
 
#define HASHSIZE   128
 
#define MPOOL_DIRTY   0x01 /* page needs to be written */
 
#define MPOOL_PINNED   0x02 /* page is pinned into memory */
 

Typedefs

typedef struct _bkt BKT
 
typedef struct MPOOL MPOOL
 

Functions

__BEGIN_DECLS MPOOL *__mpool_open __P ((void *, int, pgno_t, pgno_t))
 
void __mpool_filter __P ((MPOOL *, void(*)(void *, pgno_t, void *), void(*)(void *, pgno_t, void *), void *))
 
void *__mpool_new __P ((MPOOL *, pgno_t *))
 
void *__mpool_get __P ((MPOOL *, pgno_t, u_int))
 
int __mpool_put __P ((MPOOL *, void *, u_int))
 
int __mpool_sync __P ((MPOOL *))
 

Macro Definition Documentation

◆ HASHKEY

#define HASHKEY (   pgno)    ((pgno - 1) % HASHSIZE)

Definition at line 52 of file mpool.h.

Referenced by mpool_bkt(), mpool_get(), mpool_look(), and mpool_new().

◆ HASHSIZE

#define HASHSIZE   128

Definition at line 51 of file mpool.h.

Referenced by mpool_open().

◆ MPOOL_DIRTY

#define MPOOL_DIRTY   0x01 /* page needs to be written */

◆ MPOOL_PINNED

#define MPOOL_PINNED   0x02 /* page is pinned into memory */

Definition at line 62 of file mpool.h.

Referenced by mpool_bkt(), mpool_get(), mpool_look(), mpool_new(), and mpool_put().

Typedef Documentation

◆ BKT

typedef struct _bkt BKT

◆ MPOOL

typedef struct MPOOL MPOOL

Function Documentation

◆ __P() [1/6]

MPOOL *mpool_open __P ( (void *, int, pgno_t, pgno_t )

◆ __P() [2/6]

void mpool_filter __P ( (MPOOL *, void(*)(void *, pgno_t, void *), void(*)(void *, pgno_t, void *), void *)  )

◆ __P() [3/6]

void *mpool_new __P ( (MPOOL *, pgno_t *)  )

◆ __P() [4/6]

void *mpool_get __P ( (MPOOL *, pgno_t, u_int)  )

◆ __P() [5/6]

int mpool_put __P ( (MPOOL *, void *, u_int)  )

◆ __P() [6/6]

int mpool_close __P ( (MPOOL *)  )