Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
mpool.h File Reference
#include <sys/queue.h>

Go to the source code of this file.

Classes

struct  _bkt
struct  MPOOL

Defines

#define HASHSIZE   128
#define HASHKEY(pgno)   ((pgno - 1) % HASHSIZE)
#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 MPOOLmpool_open (void *, int, pgno_t, pgno_t)
void mpool_filter (MPOOL *, void(*)(void *, pgno_t, void *), void(*)(void *, pgno_t, void *), void *)
voidmpool_new (MPOOL *, pgno_t *)
voidmpool_get (MPOOL *, pgno_t, uint)
int mpool_put (MPOOL *, void *, uint)
int mpool_sync (MPOOL *)
int mpool_close (MPOOL *)

Define Documentation

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

Definition at line 44 of file mpool.h.

#define HASHSIZE   128

Definition at line 43 of file mpool.h.

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

Definition at line 53 of file mpool.h.

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

Definition at line 54 of file mpool.h.


Typedef Documentation

typedef struct _bkt BKT
typedef struct MPOOL MPOOL

Function Documentation

void mpool_filter ( MPOOL ,
void(*)(void *, pgno_t, void *)  ,
void(*)(void *, pgno_t, void *)  ,
void  
)
void* mpool_get ( MPOOL ,
pgno_t  ,
uint   
)
void* mpool_new ( MPOOL ,
pgno_t  
)
__BEGIN_DECLS MPOOL* mpool_open ( void ,
int  ,
pgno_t  ,
pgno_t   
)
int mpool_put ( MPOOL ,
void ,
uint   
)
int mpool_sync ( MPOOL )