From 888003c072dd98949cb3007517acb61dce486ca8 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 19 Aug 2018 02:04:44 +0300 Subject: [PATCH] mdbx: backport - fix comments typos (squashed). --- mdbx.h | 2 +- src/bits.h | 2 +- src/mdbx.c | 2 +- test/osal-windows.cc | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mdbx.h b/mdbx.h index 9758fe57..276c8ea6 100644 --- a/mdbx.h +++ b/mdbx.h @@ -468,7 +468,7 @@ typedef struct MDBX_envinfo { uint64_t lower; /* lower limit for datafile size */ uint64_t upper; /* upper limit for datafile size */ uint64_t current; /* current datafile size */ - uint64_t shrink; /* shrink theshold for datafile */ + uint64_t shrink; /* shrink threshold for datafile */ uint64_t grow; /* growth step for datafile */ } mi_geo; uint64_t mi_mapsize; /* Size of the data memory map */ diff --git a/src/bits.h b/src/bits.h index a217444b..37d528f4 100644 --- a/src/bits.h +++ b/src/bits.h @@ -408,7 +408,7 @@ typedef struct MDBX_lockinfo { volatile uint32_t mti_envmode; #ifdef MDBX_OSAL_LOCK - /* Mutex protecting write access to this table. */ + /* Mutex protecting write-txn. */ union { MDBX_OSAL_LOCK mti_wmutex; uint8_t pad_mti_wmutex[MDBX_OSAL_LOCK_SIZE % sizeof(size_t)]; diff --git a/src/mdbx.c b/src/mdbx.c index 91dac812..95e74ca4 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -5391,7 +5391,7 @@ static int __cold mdbx_setup_dxb(MDBX_env *env, int lck_rc) { /* apply preconfigured params, but only if substantial changes: * - upper or lower limit changes - * - shrink theshold or growth step + * - shrink threshold or growth step * But ignore just chagne just a 'now/current' size. */ if (bytes_align2os_bytes(env, env->me_dbgeo.upper) != pgno_align2os_bytes(env, meta.mm_geo.upper) || diff --git a/test/osal-windows.cc b/test/osal-windows.cc index 109c835a..b8cdb535 100644 --- a/test/osal-windows.cc +++ b/test/osal-windows.cc @@ -53,7 +53,7 @@ void osal_wait4barrier(void) { } } -static HANDLE make_inharitable(HANDLE hHandle) { +static HANDLE make_inheritable(HANDLE hHandle) { assert(hHandle != NULL && hHandle != INVALID_HANDLE_VALUE); if (!DuplicateHandle(GetCurrentProcess(), hHandle, GetCurrentProcess(), &hHandle, 0, TRUE, @@ -71,7 +71,7 @@ void osal_setup(const std::vector &actors) { HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); if (!hEvent) failure_perror("CreateEvent()", GetLastError()); - hEvent = make_inharitable(hEvent); + hEvent = make_inheritable(hEvent); log_trace("osal_setup: event %" PRIuPTR " -> %p", i, hEvent); events[i] = hEvent; } @@ -79,12 +79,12 @@ void osal_setup(const std::vector &actors) { hBarrierSemaphore = CreateSemaphore(NULL, 0, (LONG)actors.size(), NULL); if (!hBarrierSemaphore) failure_perror("CreateSemaphore(BarrierSemaphore)", GetLastError()); - hBarrierSemaphore = make_inharitable(hBarrierSemaphore); + hBarrierSemaphore = make_inheritable(hBarrierSemaphore); hBarrierEvent = CreateEvent(NULL, TRUE, FALSE, NULL); if (!hBarrierEvent) failure_perror("CreateEvent(BarrierEvent)", GetLastError()); - hBarrierEvent = make_inharitable(hBarrierEvent); + hBarrierEvent = make_inheritable(hBarrierEvent); } void osal_broadcast(unsigned id) {