mdbx-test: fix typo.

Change-Id: If46f000af68f068c4463e1e86ae66f99c5c3d8ac
This commit is contained in:
Leonid Yuriev 2018-08-19 02:04:44 +03:00
parent 0797ae2270
commit ffdd487037

View File

@ -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); assert(hHandle != NULL && hHandle != INVALID_HANDLE_VALUE);
if (!DuplicateHandle(GetCurrentProcess(), hHandle, GetCurrentProcess(), if (!DuplicateHandle(GetCurrentProcess(), hHandle, GetCurrentProcess(),
&hHandle, 0, TRUE, &hHandle, 0, TRUE,
@ -71,7 +71,7 @@ void osal_setup(const std::vector<actor_config> &actors) {
HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!hEvent) if (!hEvent)
failure_perror("CreateEvent()", GetLastError()); failure_perror("CreateEvent()", GetLastError());
hEvent = make_inharitable(hEvent); hEvent = make_inheritable(hEvent);
log_trace("osal_setup: event %" PRIuPTR " -> %p", i, hEvent); log_trace("osal_setup: event %" PRIuPTR " -> %p", i, hEvent);
events[i] = hEvent; events[i] = hEvent;
} }
@ -79,12 +79,12 @@ void osal_setup(const std::vector<actor_config> &actors) {
hBarrierSemaphore = CreateSemaphore(NULL, 0, (LONG)actors.size(), NULL); hBarrierSemaphore = CreateSemaphore(NULL, 0, (LONG)actors.size(), NULL);
if (!hBarrierSemaphore) if (!hBarrierSemaphore)
failure_perror("CreateSemaphore(BarrierSemaphore)", GetLastError()); failure_perror("CreateSemaphore(BarrierSemaphore)", GetLastError());
hBarrierSemaphore = make_inharitable(hBarrierSemaphore); hBarrierSemaphore = make_inheritable(hBarrierSemaphore);
hBarrierEvent = CreateEvent(NULL, TRUE, FALSE, NULL); hBarrierEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!hBarrierEvent) if (!hBarrierEvent)
failure_perror("CreateEvent(BarrierEvent)", GetLastError()); failure_perror("CreateEvent(BarrierEvent)", GetLastError());
hBarrierEvent = make_inharitable(hBarrierEvent); hBarrierEvent = make_inheritable(hBarrierEvent);
} }
void osal_broadcast(unsigned id) { void osal_broadcast(unsigned id) {