Asterisk - The Open Source Telephony Project
18.5.0
|
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../include/db.h"
#include <mpool.h>
Go to the source code of this file.
Macros | |
#define | __APPLE__ |
#define | __MPOOLINTERFACE_PRIVATE |
#define | mpool_close __mpool_close |
#define | mpool_filter __mpool_filter |
#define | mpool_get __mpool_get |
#define | mpool_new __mpool_new |
#define | mpool_open __mpool_open |
#define | mpool_put __mpool_put |
#define | mpool_sync __mpool_sync |
Functions | |
static BKT *mpool_bkt | __P ((MPOOL *)) |
static BKT *mpool_look | __P ((MPOOL *, pgno_t)) |
static int mpool_write | __P ((MPOOL *, BKT *)) |
static BKT * | mpool_bkt (MPOOL *mp) |
int | mpool_close (MPOOL *mp) |
void | mpool_filter (MPOOL *mp, void *pgin, void *pgout, void *pgcookie) |
void * | mpool_get (MPOOL *mp, pgno_t pgno, u_int flags) |
static BKT * | mpool_look (MPOOL *mp, pgno_t pgno) |
void * | mpool_new (MPOOL *mp, pgno_t *pgnoaddr) |
MPOOL * | mpool_open (void *key, int fd, pgno_t pagesize, pgno_t maxcache) |
int | mpool_put (MPOOL *mp, void *page, u_int flags) |
int | mpool_sync (MPOOL *mp) |
static int | mpool_write (MPOOL *mp, BKT *bp) |
#define __APPLE__ |
Definition at line 316 of file mpool.c.
Referenced by handle_cli_test_locales().
|
static |
|
static |
Definition at line 343 of file mpool.c.
References calloc, CIRCLEQ_REMOVE, MPOOL::curcache, _bkt::flags, HASHKEY, MPOOL::maxcache, MPOOL_DIRTY, MPOOL_PINNED, mpool_write(), NULL, _bkt::page, MPOOL::pagesize, _bkt::pgno, and RET_ERROR.
Referenced by mpool_get(), and mpool_new().
int mpool_close | ( | MPOOL * | mp | ) |
Definition at line 279 of file mpool.c.
References CIRCLEQ_REMOVE, free(), and RET_SUCCESS.
Referenced by __bt_close().
void mpool_filter | ( | MPOOL * | mp, |
void * | pgin, | ||
void * | pgout, | ||
void * | pgcookie | ||
) |
Definition at line 165 of file mpool.c.
References CIRCLEQ_INSERT_HEAD, CIRCLEQ_INSERT_TAIL, CIRCLEQ_REMOVE, EFTYPE, errno, MPOOL::fd, _bkt::flags, HASHKEY, mpool_bkt(), mpool_look(), MPOOL_PINNED, MPOOL::npages, NULL, _bkt::page, MPOOL::pagesize, MPOOL::pgcookie, and _bkt::pgno.
Referenced by __bt_curdel(), __bt_delete(), __bt_first(), __bt_new(), __bt_pdelete(), __bt_put(), __bt_relink(), __bt_search(), __bt_seqadv(), __bt_seqset(), __bt_snext(), __bt_split(), __bt_sprev(), __bt_stkacq(), __ovfl_delete(), __ovfl_get(), __rec_open(), __rec_search(), bt_fast(), bt_meta(), bt_page(), bt_preserve(), and nroot().
Definition at line 430 of file mpool.c.
References _bkt::flags, HASHKEY, MPOOL_DIRTY, MPOOL_PINNED, NULL, and _bkt::pgno.
Referenced by mpool_get().
Definition at line 130 of file mpool.c.
References CIRCLEQ_INSERT_HEAD, CIRCLEQ_INSERT_TAIL, _bkt::flags, HASHKEY, MAX_PAGE_NUMBER, mpool_bkt(), MPOOL_PINNED, MPOOL::npages, NULL, _bkt::page, and _bkt::pgno.
Referenced by __bt_new(), and nroot().
Definition at line 74 of file mpool.c.
References calloc, CIRCLEQ_INIT, errno, HASHSIZE, and NULL.
Referenced by __bt_open().
int mpool_put | ( | MPOOL * | mp, |
void * | page, | ||
u_int | flags | ||
) |
Definition at line 251 of file mpool.c.
References _bkt::flags, MPOOL_DIRTY, MPOOL_PINNED, _bkt::pgno, and RET_SUCCESS.
Referenced by __bt_bdelete(), __bt_close(), __bt_curdel(), __bt_delete(), __bt_fd(), __bt_first(), __bt_free(), __bt_get(), __bt_pdelete(), __bt_put(), __bt_relink(), __bt_search(), __bt_seq(), __bt_seqadv(), __bt_seqset(), __bt_snext(), __bt_split(), __bt_sprev(), __bt_stkacq(), __bt_sync(), __ovfl_delete(), __ovfl_get(), __ovfl_put(), __rec_close(), __rec_delete(), __rec_fd(), __rec_get(), __rec_iput(), __rec_open(), __rec_put(), __rec_search(), __rec_seq(), __rec_sync(), bt_broot(), bt_fast(), bt_meta(), bt_page(), bt_preserve(), bt_rroot(), nroot(), and rec_rdelete().
int mpool_sync | ( | MPOOL * | mp | ) |
Definition at line 300 of file mpool.c.
References MPOOL::fd, _bkt::flags, MPOOL_DIRTY, mpool_write(), RET_ERROR, and RET_SUCCESS.
Referenced by __bt_sync().
Definition at line 401 of file mpool.c.
References MPOOL::fd, _bkt::flags, MPOOL_DIRTY, _bkt::page, MPOOL::pagesize, MPOOL::pgcookie, _bkt::pgno, RET_ERROR, and RET_SUCCESS.
Referenced by mpool_bkt(), and mpool_sync().