mdbx: add 'canary' support for libfpta.

Change-Id: I62c68f149adf38d65aa9371a1fb3adac405d23ed
This commit is contained in:
Leo Yuriev
2016-11-21 20:50:39 +03:00
parent aa4fd0ec76
commit 17c6555a7f
3 changed files with 61 additions and 1 deletions

8
mdbx.h
View File

@@ -211,6 +211,14 @@ typedef int MDBX_pgvisitor_func(size_t pgno, unsigned pgnumber, void* ctx,
const char* dbi, const char *type, int nentries,
int payload_bytes, int header_bytes, int unused_bytes);
int mdbx_env_pgwalk(MDB_txn *txn, MDBX_pgvisitor_func* visitor, void* ctx);
typedef struct mdbx_canary {
size_t x, y, z, v;
} mdbx_canary;
int mdbx_canary_put(MDB_txn *txn, const mdbx_canary* canary);
size_t mdbx_canary_get(MDB_txn *txn, mdbx_canary* canary);
/** @} */
#ifdef __cplusplus