mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:14:12 +08:00
mdbx: cleanup tabs (cosmetics).
Change-Id: If941ea89d844f98f274da4ddfc3f2ae97986eeb7
This commit is contained in:
parent
aeda2aa8c5
commit
08753b46a1
16
mdbx.h
16
mdbx.h
@ -310,7 +310,7 @@
|
|||||||
* in addition to those listed for some functions.
|
* in addition to those listed for some functions.
|
||||||
*
|
*
|
||||||
* - Troubleshooting the LCK-file.
|
* - Troubleshooting the LCK-file.
|
||||||
* 1. A broken LCK-file can cause sync issues, including appearance of
|
* 1. A broken LCK-file can cause sync issues, including appearance of
|
||||||
* wrong/inconsistent data for readers. When database opened in the
|
* wrong/inconsistent data for readers. When database opened in the
|
||||||
* cooperative read-write mode the LCK-file requires to be mapped to
|
* cooperative read-write mode the LCK-file requires to be mapped to
|
||||||
* memory in read-write access. In this case it is always possible for
|
* memory in read-write access. In this case it is always possible for
|
||||||
@ -327,14 +327,14 @@
|
|||||||
* Workaround: Just make all programs using the database close it;
|
* Workaround: Just make all programs using the database close it;
|
||||||
* the LCK-file is always reset on first open.
|
* the LCK-file is always reset on first open.
|
||||||
*
|
*
|
||||||
* 2. Stale reader transactions left behind by an aborted program cause
|
* 2. Stale reader transactions left behind by an aborted program cause
|
||||||
* further writes to grow the database quickly, and stale locks can
|
* further writes to grow the database quickly, and stale locks can
|
||||||
* block further operation.
|
* block further operation.
|
||||||
* MDBX checks for stale readers while opening environment and before
|
* MDBX checks for stale readers while opening environment and before
|
||||||
* growth the database. But in some cases, this may not be enough.
|
* growth the database. But in some cases, this may not be enough.
|
||||||
*
|
*
|
||||||
* Workaround: Check for stale readers periodically, using the
|
* Workaround: Check for stale readers periodically, using the
|
||||||
* mdbx_reader_check() function or the mdbx_stat tool.
|
* mdbx_reader_check() function or the mdbx_stat tool.
|
||||||
*
|
*
|
||||||
* 3. Stale writers will be cleared automatically by MDBX on supprted
|
* 3. Stale writers will be cleared automatically by MDBX on supprted
|
||||||
* platforms. But this is platform-specific, especially of
|
* platforms. But this is platform-specific, especially of
|
||||||
@ -379,7 +379,7 @@
|
|||||||
* The "next" version of libmdbx (MithrilDB) will solve this issue.
|
* The "next" version of libmdbx (MithrilDB) will solve this issue.
|
||||||
*
|
*
|
||||||
* - A thread can only use one transaction at a time, plus any nested
|
* - A thread can only use one transaction at a time, plus any nested
|
||||||
* read-write transactions in the non-writemap mode. Each transaction
|
* read-write transactions in the non-writemap mode. Each transaction
|
||||||
* belongs to one thread. The MDBX_NOTLS flag changes this for read-only
|
* belongs to one thread. The MDBX_NOTLS flag changes this for read-only
|
||||||
* transactions. See below.
|
* transactions. See below.
|
||||||
*
|
*
|
||||||
@ -451,7 +451,7 @@
|
|||||||
* above.
|
* above.
|
||||||
*
|
*
|
||||||
* - An MDBX database configuration will often reserve considerable unused
|
* - An MDBX database configuration will often reserve considerable unused
|
||||||
* memory address space and maybe file size for future growth. This does
|
* memory address space and maybe file size for future growth. This does
|
||||||
* not use actual memory or disk space, but users may need to understand
|
* not use actual memory or disk space, but users may need to understand
|
||||||
* the difference so they won't be scared off.
|
* the difference so they won't be scared off.
|
||||||
*
|
*
|
||||||
@ -3434,7 +3434,7 @@ typedef uint_fast64_t mdbx_attr_t;
|
|||||||
* [in] flags Options for this operation. This parameter must be set to 0
|
* [in] flags Options for this operation. This parameter must be set to 0
|
||||||
* or one of the values described here:
|
* or one of the values described here:
|
||||||
*
|
*
|
||||||
* - MDBX_CURRENT
|
* - MDBX_CURRENT
|
||||||
* Replace the item at the current cursor position. The key parameter
|
* Replace the item at the current cursor position. The key parameter
|
||||||
* must still be provided, and must match it, otherwise the function
|
* must still be provided, and must match it, otherwise the function
|
||||||
* return MDBX_EKEYMISMATCH.
|
* return MDBX_EKEYMISMATCH.
|
||||||
@ -3516,8 +3516,8 @@ LIBMDBX_API int mdbx_put_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key,
|
|||||||
*
|
*
|
||||||
* Returns A non-zero error value on failure and 0 on success, some
|
* Returns A non-zero error value on failure and 0 on success, some
|
||||||
* possible errors are:
|
* possible errors are:
|
||||||
* - MDBX_NOTFOUND = the key-value pair was not in the database.
|
* - MDBX_NOTFOUND = the key-value pair was not in the database.
|
||||||
* - MDBX_EINVAL = an invalid parameter was specified. */
|
* - MDBX_EINVAL = an invalid parameter was specified. */
|
||||||
LIBMDBX_API int mdbx_set_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key,
|
LIBMDBX_API int mdbx_set_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key,
|
||||||
MDBX_val *data, mdbx_attr_t attr);
|
MDBX_val *data, mdbx_attr_t attr);
|
||||||
|
|
||||||
|
@ -142,33 +142,33 @@
|
|||||||
#endif /* __maybe_unused */
|
#endif /* __maybe_unused */
|
||||||
|
|
||||||
#if !defined(__noop) && !defined(_MSC_VER)
|
#if !defined(__noop) && !defined(_MSC_VER)
|
||||||
# define __noop(...) do {} while(0)
|
# define __noop(...) do {} while(0)
|
||||||
#endif /* __noop */
|
#endif /* __noop */
|
||||||
|
|
||||||
#ifndef __fallthrough
|
#ifndef __fallthrough
|
||||||
# if __GNUC_PREREQ(7, 0) || __has_attribute(__fallthrough__)
|
# if __GNUC_PREREQ(7, 0) || __has_attribute(__fallthrough__)
|
||||||
# define __fallthrough __attribute__((__fallthrough__))
|
# define __fallthrough __attribute__((__fallthrough__))
|
||||||
# else
|
# else
|
||||||
# define __fallthrough __noop()
|
# define __fallthrough __noop()
|
||||||
# endif
|
# endif
|
||||||
#endif /* __fallthrough */
|
#endif /* __fallthrough */
|
||||||
|
|
||||||
#ifndef __unreachable
|
#ifndef __unreachable
|
||||||
# if __GNUC_PREREQ(4,5) || __has_builtin(__builtin_unreachable)
|
# if __GNUC_PREREQ(4,5) || __has_builtin(__builtin_unreachable)
|
||||||
# define __unreachable() __builtin_unreachable()
|
# define __unreachable() __builtin_unreachable()
|
||||||
# elif defined(_MSC_VER)
|
# elif defined(_MSC_VER)
|
||||||
# define __unreachable() __assume(0)
|
# define __unreachable() __assume(0)
|
||||||
# else
|
# else
|
||||||
# define __unreachable() __noop()
|
# define __unreachable() __noop()
|
||||||
# endif
|
# endif
|
||||||
#endif /* __unreachable */
|
#endif /* __unreachable */
|
||||||
|
|
||||||
#ifndef __prefetch
|
#ifndef __prefetch
|
||||||
# if defined(__GNUC__) || defined(__clang__)
|
# if defined(__GNUC__) || defined(__clang__)
|
||||||
# define __prefetch(ptr) __builtin_prefetch(ptr)
|
# define __prefetch(ptr) __builtin_prefetch(ptr)
|
||||||
# else
|
# else
|
||||||
# define __prefetch(ptr) __noop(ptr)
|
# define __prefetch(ptr) __noop(ptr)
|
||||||
# endif
|
# endif
|
||||||
#endif /* __prefetch */
|
#endif /* __prefetch */
|
||||||
|
|
||||||
#ifndef __noreturn
|
#ifndef __noreturn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user