Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF  4.3.0
API Reference
 
Loading...
Searching...
No Matches
mcache_priv.h File Reference
#include "hdf_priv.h"
#include "hqueue_priv.h"

Data Structures

struct  BKT
 
struct  L_ELEM
 
struct  MCACHE
 
struct  MCACHE::_lqh
 
struct  MCACHE::_hqh
 
struct  MCACHE::_lhqh
 

Macros

#define RET_SUCCESS   SUCCEED
 
#define RET_ERROR   FAIL
 
#define HASHSIZE   128
 
#define HASHKEY(pgno)   ((pgno - 1) % HASHSIZE)
 
#define DEF_PAGESIZE   8192
 
#define DEF_MAXCACHE   1
 
#define MAX_PAGE_NUMBER   0xffffffff /* >= # of pages in a object */
 
#define MCACHE_DIRTY   0x01 /* page needs to be written */
 
#define MCACHE_PINNED   0x02 /* page is pinned into memory */
 
#define ELEM_READ   0x01
 
#define ELEM_WRITTEN   0x02
 
#define ELEM_SYNC   0x03
 
#define MCACHE_EXTEND
 

Functions

MCACHEmcache_open (void *key, int32 object_id, int32 pagesize, int32 maxcache, int32 npages, int32 flags)
 
void mcache_filter (MCACHE *mp, int32(*pgin)(void *cookie, int32 pgno, void *page), int32(*pgout)(void *cookie, int32 pgno, const void *page), void *pgcookie)
 
void * mcache_new (MCACHE *mp, int32 *pgnoaddr, int32 flags)
 
void * mcache_get (MCACHE *mp, int32 pgno, int32 flags)
 
intn mcache_put (MCACHE *mp, void *page, int32 flags)
 
intn mcache_sync (MCACHE *mp)
 
intn mcache_close (MCACHE *mp)
 
int32 mcache_get_pagesize (MCACHE *mp)
 
int32 mcache_get_maxcache (MCACHE *mp)
 
int32 mcache_set_maxcache (MCACHE *mp, int32 maxcache)
 
int32 mcache_get_npages (MCACHE *mp)
 

Macro Definition Documentation

◆ DEF_MAXCACHE

#define DEF_MAXCACHE   1

◆ DEF_PAGESIZE

#define DEF_PAGESIZE   8192

◆ ELEM_READ

#define ELEM_READ   0x01

◆ ELEM_SYNC

#define ELEM_SYNC   0x03

◆ ELEM_WRITTEN

#define ELEM_WRITTEN   0x02

◆ HASHKEY

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

◆ HASHSIZE

#define HASHSIZE   128

◆ MAX_PAGE_NUMBER

#define MAX_PAGE_NUMBER   0xffffffff /* >= # of pages in a object */

◆ MCACHE_DIRTY

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

◆ MCACHE_EXTEND

#define MCACHE_EXTEND
Value:
0x10 /* increase number of pages \
i.e extend object */

◆ MCACHE_PINNED

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

◆ RET_ERROR

#define RET_ERROR   FAIL

◆ RET_SUCCESS

#define RET_SUCCESS   SUCCEED

Function Documentation

◆ mcache_close()

intn mcache_close ( MCACHE * mp)
extern

◆ mcache_filter()

void mcache_filter ( MCACHE * mp,
int32(*)(void *cookie, int32 pgno, void *page) pgin,
int32(*)(void *cookie, int32 pgno, const void *page) pgout,
void * pgcookie )
extern

◆ mcache_get()

void * mcache_get ( MCACHE * mp,
int32 pgno,
int32 flags )
extern

◆ mcache_get_maxcache()

int32 mcache_get_maxcache ( MCACHE * mp)
extern

◆ mcache_get_npages()

int32 mcache_get_npages ( MCACHE * mp)
extern

◆ mcache_get_pagesize()

int32 mcache_get_pagesize ( MCACHE * mp)
extern

◆ mcache_new()

void * mcache_new ( MCACHE * mp,
int32 * pgnoaddr,
int32 flags )
extern

◆ mcache_open()

MCACHE * mcache_open ( void * key,
int32 object_id,
int32 pagesize,
int32 maxcache,
int32 npages,
int32 flags )
extern

◆ mcache_put()

intn mcache_put ( MCACHE * mp,
void * page,
int32 flags )
extern

◆ mcache_set_maxcache()

int32 mcache_set_maxcache ( MCACHE * mp,
int32 maxcache )
extern

◆ mcache_sync()

intn mcache_sync ( MCACHE * mp)
extern