mdbx: more Doxygen tags (almost done).

Change-Id: I696e717e37a905f68af059c51f9df327c257332e
This commit is contained in:
Leonid Yuriev 2020-07-23 19:24:21 +03:00
parent 2cd7fcb16d
commit a902538e34
11 changed files with 1567 additions and 1386 deletions

View File

@ -270,8 +270,8 @@ docs/intro.md: docs/_preface.md docs/__characteristics.md docs/__improvements.md
docs/usage.md: docs/__usage.md docs/_starting.md docs/__bindings.md docs/usage.md: docs/__usage.md docs/_starting.md docs/__bindings.md
echo -e "\\page usage Usage\n\\section getting Getting the libmdbx" | cat - $? | sed 's/^Bindings$$/Bindings {#bindings}/' > $@ echo -e "\\page usage Usage\n\\section getting Getting the libmdbx" | cat - $? | sed 's/^Bindings$$/Bindings {#bindings}/' > $@
doxygen: docs/Doxyfile docs/overall.md docs/intro.md docs/usage.md mdbx.h ChangeLog.md doxygen: docs/Doxyfile docs/overall.md docs/intro.md docs/usage.md mdbx.h ChangeLog.md AUTHORS LICENSE
rm -rf docs/html && cp mdbx.h ChangeLog.md docs/ && (cd docs && doxygen Doxyfile) rm -rf docs/html && cp mdbx.h ChangeLog.md docs/ && (cd docs && doxygen Doxyfile) && cp AUTHORS LICENSE docs/html/
.PHONY: dist release-assets .PHONY: dist release-assets
dist: libmdbx-sources-$(MDBX_VERSION_SUFFIX).tar.gz $(lastword $(MAKEFILE_LIST)) dist: libmdbx-sources-$(MDBX_VERSION_SUFFIX).tar.gz $(lastword $(MAKEFILE_LIST))

View File

@ -460,9 +460,9 @@ from the [ios-cmake](https://github.com/leetal/ios-cmake) project.
<!-- section-end --> <!-- section-end -->
## API description ## API description
For more information and API description see the [mdbx.h](mdbx.h) header.
Please do not hesitate to point out errors in the documentation, Please refer to the online [_libmdbx_ API reference](https://erthink.github.io/libmdbx/)
including creating [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) with corrections and improvements. and/or see the [mdbx.h](mdbx.h) header.
<!-- section-begin bindings --> <!-- section-begin bindings -->

View File

@ -1558,7 +1558,7 @@ FORMULA_MACROFILE =
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
USE_MATHJAX = NO USE_MATHJAX = YES
# When MathJax is enabled you can set the default output format to be used for # When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see: # the MathJax output. See the MathJax site (see:

View File

@ -34,8 +34,9 @@ each of which is divided into several sections.
- Cleaning up - Cleaning up
- \ref bindings - \ref bindings
3. The `C` API reference manual: 3. The `C` API manual:
- TODO - The \ref c_api reference
- The \ref mdbx.h header file reference
Please do not hesitate to point out errors in the documentation, Please do not hesitate to point out errors in the documentation,
including creating [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) with corrections and improvements. including creating [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) with corrections and improvements.

2914
mdbx.h

File diff suppressed because it is too large Load Diff

View File

@ -15708,7 +15708,7 @@ static int __cold mdbx_env_compact(MDBX_env *env, MDBX_txn *read_txn,
MDBX_meta *const meta = mdbx_init_metas(env, buffer); MDBX_meta *const meta = mdbx_init_metas(env, buffer);
mdbx_meta_set_txnid(env, meta, read_txn->mt_txnid); mdbx_meta_set_txnid(env, meta, read_txn->mt_txnid);
if (flags & MDBX_CP_FORCE_RESIZEABLE) if (flags & MDBX_CP_FORCE_DYNAMIC_SIZE)
make_sizeable(meta); make_sizeable(meta);
/* copy canary sequenses if present */ /* copy canary sequenses if present */
@ -15864,7 +15864,7 @@ static int __cold mdbx_env_copy_asis(MDBX_env *env, MDBX_txn *read_txn,
(MDBX_meta *)(buffer + ((uint8_t *)mdbx_meta_head(env) - env->me_map)); (MDBX_meta *)(buffer + ((uint8_t *)mdbx_meta_head(env) - env->me_map));
mdbx_txn_unlock(env); mdbx_txn_unlock(env);
if (flags & MDBX_CP_FORCE_RESIZEABLE) if (flags & MDBX_CP_FORCE_DYNAMIC_SIZE)
make_sizeable(headcopy); make_sizeable(headcopy);
/* Update signature to steady */ /* Update signature to steady */
headcopy->mm_datasync_sign = mdbx_meta_sign(headcopy); headcopy->mm_datasync_sign = mdbx_meta_sign(headcopy);
@ -17666,7 +17666,7 @@ int __cold mdbx_env_pgwalk(MDBX_txn *txn, MDBX_pgvisitor_func *visitor,
return rc; return rc;
} }
int mdbx_canary_put(MDBX_txn *txn, const mdbx_canary *canary) { int mdbx_canary_put(MDBX_txn *txn, const MDBX_canary *canary) {
int rc = check_txn_rw(txn, MDBX_TXN_BLOCKED); int rc = check_txn_rw(txn, MDBX_TXN_BLOCKED);
if (unlikely(rc != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return rc; return rc;
@ -17685,7 +17685,7 @@ int mdbx_canary_put(MDBX_txn *txn, const mdbx_canary *canary) {
return MDBX_SUCCESS; return MDBX_SUCCESS;
} }
int mdbx_canary_get(const MDBX_txn *txn, mdbx_canary *canary) { int mdbx_canary_get(const MDBX_txn *txn, MDBX_canary *canary) {
int rc = check_txn(txn, MDBX_TXN_BLOCKED); int rc = check_txn(txn, MDBX_TXN_BLOCKED);
if (unlikely(rc != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return rc; return rc;

View File

@ -304,7 +304,7 @@ typedef struct MDBX_meta {
#define mm_psize mm_dbs[FREE_DBI].md_xsize #define mm_psize mm_dbs[FREE_DBI].md_xsize
/* Any persistent environment flags, see mdbx_env */ /* Any persistent environment flags, see mdbx_env */
#define mm_flags mm_dbs[FREE_DBI].md_flags #define mm_flags mm_dbs[FREE_DBI].md_flags
mdbx_canary mm_canary; MDBX_canary mm_canary;
#define MDBX_DATASIGN_NONE 0u #define MDBX_DATASIGN_NONE 0u
#define MDBX_DATASIGN_WEAK 1u #define MDBX_DATASIGN_WEAK 1u
@ -770,7 +770,7 @@ struct MDBX_txn {
* don't decrement it when individual DB handles are closed. */ * don't decrement it when individual DB handles are closed. */
MDBX_dbi mt_numdbs; MDBX_dbi mt_numdbs;
size_t mt_owner; /* thread ID that owns this transaction */ size_t mt_owner; /* thread ID that owns this transaction */
mdbx_canary mt_canary; MDBX_canary mt_canary;
union { union {
struct { struct {

View File

@ -138,7 +138,7 @@ static int dump_sdb(MDBX_txn *txn, MDBX_dbi dbi, char *name) {
printf("mapsize=%" PRIu64 "\n", info.mi_geo.upper); printf("mapsize=%" PRIu64 "\n", info.mi_geo.upper);
printf("maxreaders=%u\n", info.mi_maxreaders); printf("maxreaders=%u\n", info.mi_maxreaders);
mdbx_canary canary; MDBX_canary canary;
rc = mdbx_canary_get(txn, &canary); rc = mdbx_canary_get(txn, &canary);
if (unlikely(rc != MDBX_SUCCESS)) { if (unlikely(rc != MDBX_SUCCESS)) {
error("mdbx_canary_get", rc); error("mdbx_canary_get", rc);

View File

@ -109,7 +109,7 @@ static char *subname = nullptr;
static int dbi_flags; static int dbi_flags;
static txnid_t txnid; static txnid_t txnid;
static uint64_t sequence; static uint64_t sequence;
static mdbx_canary canary; static MDBX_canary canary;
static MDBX_envinfo envinfo; static MDBX_envinfo envinfo;
#define PRINT 1 #define PRINT 1

View File

@ -411,7 +411,7 @@ bool testcase::should_continue(bool check_timeout_only) const {
} }
void testcase::fetch_canary() { void testcase::fetch_canary() {
mdbx_canary canary_now; MDBX_canary canary_now;
log_trace(">> fetch_canary"); log_trace(">> fetch_canary");
int rc = mdbx_canary_get(txn_guard.get(), &canary_now); int rc = mdbx_canary_get(txn_guard.get(), &canary_now);
@ -434,7 +434,7 @@ void testcase::fetch_canary() {
} }
void testcase::update_canary(uint64_t increment) { void testcase::update_canary(uint64_t increment) {
mdbx_canary canary_now = last.canary; MDBX_canary canary_now = last.canary;
log_trace(">> update_canary: sequence %" PRIu64 " += %" PRIu64, canary_now.y, log_trace(">> update_canary: sequence %" PRIu64 " += %" PRIu64, canary_now.y,
increment); increment);

View File

@ -155,7 +155,7 @@ protected:
keygen::maker keyvalue_maker; keygen::maker keyvalue_maker;
struct { struct {
mdbx_canary canary; MDBX_canary canary;
} last; } last;
SET speculum{ItemCompare(this)}, speculum_commited{ItemCompare(this)}; SET speculum{ItemCompare(this)}, speculum_commited{ItemCompare(this)};