This commit is contained in:
Hongze Cheng 2022-03-09 08:49:20 +00:00
parent 737497d8b6
commit 6f3743e187
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,7 @@ typedef struct __attribute__((__packed__)) {
struct SPage {
pthread_spinlock_t lock;
void *pData;
u8 *pData;
SPgid pgid;
// Fields used by SPCache
@ -49,6 +49,10 @@ struct SPage {
int aiOvfl[4];
};
// Macros
#define TDB_PAGE_CELL_IDX_AT(pPage, idx) ((pPage)->aCellIdx[idx])
#define TDB_PAGE_CELL_AT(pPage, idx) ((pPage)->pData + TDB_PAGE_CELL_IDX_AT(pPage, idx))
// For page lock
#define P_LOCK_SUCC 0
#define P_LOCK_BUSY 1