mdbx: add PTHREAD_MUTEX_ERRORCHECK for shared mutexes.

Change-Id: Ib9520b6bc68b294088298b1901278fab824ea43e
This commit is contained in:
Leo Yuriev 2018-08-02 18:36:45 +03:00
parent 6a51343b89
commit e0fcd6e0ec

View File

@ -156,6 +156,10 @@ int __cold mdbx_lck_init(MDBX_env *env) {
goto bailout;
#endif /* PTHREAD_PRIO_INHERIT */
rc = pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_ERRORCHECK);
if (rc)
goto bailout;
rc = pthread_mutex_init(&env->me_lck->mti_rmutex, &ma);
if (rc)
goto bailout;