From eddade7b9945963b971a219f2e59ce5288a7ad75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 12 Nov 2023 00:23:26 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D0=BE=D0=B2=20=D0=B8=D0=BC=D1=91=D0=BD?= =?UTF-8?q?=20osal-ipc=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lck-posix.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lck-posix.c b/src/lck-posix.c index d55a9395..d8f1fdc6 100644 --- a/src/lck-posix.c +++ b/src/lck-posix.c @@ -875,7 +875,7 @@ MDBX_INTERNAL_FUNC int osal_check_tid4bionic(void) { } #endif /* __ANDROID_API__ || ANDROID) || BIONIC */ -static int mdbx_ipclock_lock(MDBX_env *env, osal_ipclock_t *ipc, +static int osal_ipclock_lock(MDBX_env *env, osal_ipclock_t *ipc, const bool dont_wait) { #if MDBX_LOCKING == MDBX_LOCKING_POSIX2001 || \ MDBX_LOCKING == MDBX_LOCKING_POSIX2008 @@ -915,7 +915,7 @@ static int mdbx_ipclock_lock(MDBX_env *env, osal_ipclock_t *ipc, return rc; } -static int mdbx_ipclock_unlock(MDBX_env *env, osal_ipclock_t *ipc) { +int osal_ipclock_unlock(MDBX_env *env, osal_ipclock_t *ipc) { #if MDBX_LOCKING == MDBX_LOCKING_POSIX2001 || \ MDBX_LOCKING == MDBX_LOCKING_POSIX2008 int rc = pthread_mutex_unlock(ipc); @@ -940,14 +940,14 @@ static int mdbx_ipclock_unlock(MDBX_env *env, osal_ipclock_t *ipc) { MDBX_INTERNAL_FUNC int osal_rdt_lock(MDBX_env *env) { TRACE("%s", ">>"); jitter4testing(true); - int rc = mdbx_ipclock_lock(env, &env->me_lck->mti_rlock, false); + int rc = osal_ipclock_lock(env, &env->me_lck->mti_rlock, false); TRACE("<< rc %d", rc); return rc; } MDBX_INTERNAL_FUNC void osal_rdt_unlock(MDBX_env *env) { TRACE("%s", ">>"); - int rc = mdbx_ipclock_unlock(env, &env->me_lck->mti_rlock); + int rc = osal_ipclock_unlock(env, &env->me_lck->mti_rlock); TRACE("<< rc %d", rc); if (unlikely(rc != MDBX_SUCCESS)) mdbx_panic("%s() failed: err %d\n", __func__, rc); @@ -957,7 +957,7 @@ MDBX_INTERNAL_FUNC void osal_rdt_unlock(MDBX_env *env) { int osal_txn_lock(MDBX_env *env, bool dont_wait) { TRACE("%swait %s", dont_wait ? "dont-" : "", ">>"); jitter4testing(true); - const int err = mdbx_ipclock_lock(env, &env->me_lck->mti_wlock, dont_wait); + const int err = osal_ipclock_lock(env, &env->me_lck->mti_wlock, dont_wait); int rc = err; if (likely(!MDBX_IS_ERROR(err))) { eASSERT(env, !env->me_txn0->mt_owner || @@ -975,7 +975,7 @@ void osal_txn_unlock(MDBX_env *env) { TRACE("%s", ">>"); eASSERT(env, env->me_txn0->mt_owner == osal_thread_self()); env->me_txn0->mt_owner = 0; - int err = mdbx_ipclock_unlock(env, &env->me_lck->mti_wlock); + int err = osal_ipclock_unlock(env, &env->me_lck->mti_wlock); TRACE("<< err %d", err); if (unlikely(err != MDBX_SUCCESS)) mdbx_panic("%s() failed: err %d\n", __func__, err);