more TDB
This commit is contained in:
parent
64be05208e
commit
34355a49e4
|
@ -13,4 +13,12 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tdbInt.h"
|
#include "tdbInt.h"
|
||||||
|
|
||||||
|
struct SBTree {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SBtCursor {
|
||||||
|
// TODO
|
||||||
|
};
|
|
@ -13,4 +13,55 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tdbInt.h"
|
#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;
|
||||||
|
}
|
|
@ -20,11 +20,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct SBTree SBTree;
|
typedef struct SBTree SBTree;
|
||||||
|
typedef struct SBtCursor SBtCursor;
|
||||||
struct SBTree {
|
|
||||||
// TODO
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,6 @@ int pgCacheRelease(SPage *pPage);
|
||||||
|
|
||||||
// SPage
|
// SPage
|
||||||
|
|
||||||
// Impl
|
|
||||||
struct SPgCache {
|
|
||||||
// TODO
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue