more
This commit is contained in:
parent
932a77b5f8
commit
9842da7909
|
@ -9,6 +9,7 @@ target_sources(tdb
|
|||
PRIVATE
|
||||
"src/db/tdbPCache.c"
|
||||
"src/db/tdbPFile.c"
|
||||
"src/db/tdbUtil.c"
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "tdbInt.h"
|
||||
|
||||
#if 0
|
||||
struct STDbEnv {
|
||||
char * rootDir; // root directory of the environment
|
||||
char * jname; // journal file name
|
||||
|
@ -170,4 +171,5 @@ int tdbEnvRgstPageFile(TENV *pEnv, SPgFile *pPgFile) {
|
|||
int tdbEnvRgstDB(TENV *pEnv, TDB *pDb) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -51,7 +51,7 @@ int tdbCheckFileAccess(const char *pathname, int mode) {
|
|||
return access(pathname, flags);
|
||||
}
|
||||
|
||||
int tdbGetFileSize(const char *fname, pgsz_t pgSize, SPgno *pSize) {
|
||||
int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize) {
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -20,11 +20,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
const char* tdbEnvGetRootDir(TENV* pEnv);
|
||||
SPgFile* tdbEnvGetPageFile(TENV* pEnv, const uint8_t fileid[]);
|
||||
SPgCache* tdbEnvGetPgCache(TENV* pEnv);
|
||||
int tdbEnvRgstPageFile(TENV* pEnv, SPgFile* pPgFile);
|
||||
int tdbEnvRgstDB(TENV* pEnv, TDB* pDb);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "tlist.h"
|
||||
#include "tlockfree.h"
|
||||
|
||||
#include "tdb.h"
|
||||
// #include "tdb.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -70,9 +70,6 @@ typedef int32_t frame_id_t;
|
|||
#define TDB_DEFAULT_PGSIZE 4096
|
||||
#define TDB_IS_PGSIZE_VLD(s) (((s) >= TDB_MIN_PGSIZE) && ((s) <= TDB_MAX_PGSIZE))
|
||||
|
||||
// pgoff_t
|
||||
typedef pgsz_t pgoff_t;
|
||||
|
||||
// cache
|
||||
#define TDB_DEFAULT_CACHE_SIZE (256 * 4096) // 1M
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique);
|
|||
#define TDB_W_OK 0x4
|
||||
int tdbCheckFileAccess(const char *pathname, int mode);
|
||||
|
||||
int tdbGetFileSize(const char *fname, pgsz_t pgSize, SPgno *pSize);
|
||||
int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue