提交 34355a49 编写于 作者: H Hongze Cheng

more TDB

上级 64be0520
......@@ -14,3 +14,11 @@
*/
#include "tdbInt.h"
struct SBTree {
// TODO
};
struct SBtCursor {
// TODO
};
\ No newline at end of file
......@@ -14,3 +14,54 @@
*/
#include "tdbInt.h"
struct SPage {
pgid_t pgid; // page id
// TODO
};
typedef TD_DLIST(SPage) SPgList;
struct SPgCache {
SPage *pages;
SPgList freeList;
struct {
int32_t nbucket;
struct {
SRWLatch latch;
TD_DLIST(SPage) ht;
} * buckets;
} pght; // page hash table
};
int pgCacheCreate(SPgCache **ppPgCache) {
// TODO
return 0;
}
int pgCacheDestroy(SPgCache *pPgCache) {
// TODO
return 0;
}
int pgCacheOpen(SPgCache *pPgCache) {
// TODO
return 0;
}
int pgCacheClose(SPgCache *pPgCache) {
// TODO
return 0;
}
SPage *pgCacheFetch(SPgCache *pPgCache) {
// TODO
return NULL;
}
int pgCacheRelease(SPage *pPage) {
// TODO
return 0;
}
\ No newline at end of file
......@@ -21,10 +21,7 @@ extern "C" {
#endif
typedef struct SBTree SBTree;
struct SBTree {
// TODO
};
typedef struct SBtCursor SBtCursor;
#ifdef __cplusplus
}
......
......@@ -34,11 +34,6 @@ int pgCacheRelease(SPage *pPage);
// SPage
// Impl
struct SPgCache {
// TODO
};
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册