mdbx: add MDBX_SAFE4QEMU option for testing under QEMU.

Change-Id: Ide674e0125e2746f73a7ba44828316a60633e887
This commit is contained in:
Leonid Yuriev
2018-11-26 19:08:30 +03:00
parent 9379ba7733
commit f778f4a795
3 changed files with 7 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright 2015-2018 Leonid Yuriev <leo@yuriev.ru>
* and other libmdbx authors: please see AUTHORS file.
* All rights reserved.
@@ -149,7 +149,7 @@ int __cold mdbx_lck_init(MDBX_env *env) {
goto bailout;
#endif /* MDBX_USE_ROBUST */
#if _POSIX_C_SOURCE >= 199506L
#if _POSIX_C_SOURCE >= 199506L && !defined(MDBX_SAFE4QEMU)
rc = pthread_mutexattr_setprotocol(&ma, PTHREAD_PRIO_INHERIT);
if (rc == ENOTSUP)
rc = pthread_mutexattr_setprotocol(&ma, PTHREAD_PRIO_NONE);