提交 9916d248 编写于 作者: H Hongze Cheng

more refact

上级 1e5c2688
...@@ -42,7 +42,7 @@ static void tdbPCachePinPage(SPgHdr *pPage); ...@@ -42,7 +42,7 @@ static void tdbPCachePinPage(SPgHdr *pPage);
static void tdbPCacheRemovePageFromHash(SPgHdr *pPage); static void tdbPCacheRemovePageFromHash(SPgHdr *pPage);
static void tdbPCacheAddPageToHash(SPgHdr *pPage); static void tdbPCacheAddPageToHash(SPgHdr *pPage);
int tdbOpenPCache(int pageSize, int cacheSize, int extraSize, SPCache **ppCache) { int tdbPCacheOpen(int pageSize, int cacheSize, int extraSize, SPCache **ppCache) {
SPCache *pCache; SPCache *pCache;
void * pPtr; void * pPtr;
SPgHdr * pPgHdr; SPgHdr * pPgHdr;
...@@ -74,7 +74,7 @@ int tdbOpenPCache(int pageSize, int cacheSize, int extraSize, SPCache **ppCache) ...@@ -74,7 +74,7 @@ int tdbOpenPCache(int pageSize, int cacheSize, int extraSize, SPCache **ppCache)
return 0; return 0;
} }
int tdbClosePCache(SPCache *pCache) { int tdbPCacheClose(SPCache *pCache) {
/* TODO */ /* TODO */
return 0; return 0;
} }
......
...@@ -36,7 +36,7 @@ struct SPgHdr { ...@@ -36,7 +36,7 @@ struct SPgHdr {
SPgHdr * pLruPrev; SPgHdr * pLruPrev;
}; };
int tdbOpenPCache(int pageSize, int cacheSize, int extraSize, SPCache **ppCache); int tdbPCacheOpen(int pageSize, int cacheSize, int extraSize, SPCache **ppCache);
int tdbPCacheClose(SPCache *pCache); int tdbPCacheClose(SPCache *pCache);
SPgHdr *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, bool alcNewPage); SPgHdr *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, bool alcNewPage);
void tdbFetchFinish(SPCache *pCache, SPgHdr *pPage); void tdbFetchFinish(SPCache *pCache, SPgHdr *pPage);
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
extern "C" { extern "C" {
#endif #endif
typedef struct SPFile SPFile;
// typedef struct __attribute__((__packed__)) { // typedef struct __attribute__((__packed__)) {
// char hdrInfo[16]; // info string // char hdrInfo[16]; // info string
// pgsz_t szPage; // page size of current file // pgsz_t szPage; // page size of current file
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册