From 10108f34fcf7cde0cb71c63f7ee9125c6eb66808 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 16 Feb 2022 09:41:09 +0000 Subject: [PATCH] more TDB --- source/libs/tdb/src/db/tdbPgCache.c | 10 ---------- source/libs/tdb/src/inc/tdbPgCache.h | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPgCache.c b/source/libs/tdb/src/db/tdbPgCache.c index e6fef996cf..1b000aa6d6 100644 --- a/source/libs/tdb/src/db/tdbPgCache.c +++ b/source/libs/tdb/src/db/tdbPgCache.c @@ -14,16 +14,6 @@ */ #include "tdbInt.h" -typedef TD_DLIST_NODE(SPage) SPgListNode; -struct SPage { - pgid_t pgid; // page id - frame_id_t frameid; // frame id - uint8_t * pData; // real data - SPgListNode freeNode; // for SPgCache.freeList - SPgListNode pghtNode; // for pght - SPgListNode lruNode; // for LRU -}; - typedef TD_DLIST(SPage) SPgList; struct SPgCache { TENV * pEnv; // TENV containing this page cache diff --git a/source/libs/tdb/src/inc/tdbPgCache.h b/source/libs/tdb/src/inc/tdbPgCache.h index 5bcac688af..c25ef27c10 100644 --- a/source/libs/tdb/src/inc/tdbPgCache.h +++ b/source/libs/tdb/src/inc/tdbPgCache.h @@ -31,6 +31,15 @@ SPage *pgCacheFetch(SPgCache *pPgCache, pgid_t pgid); int pgCacheRelease(SPage *pPage); // SPage +typedef TD_DLIST_NODE(SPage) SPgListNode; +struct SPage { + pgid_t pgid; // page id + frame_id_t frameid; // frame id + uint8_t * pData; // real data + SPgListNode freeNode; // for SPgCache.freeList + SPgListNode pghtNode; // for pght + SPgListNode lruNode; // for LRU +}; #ifdef __cplusplus } -- GitLab