mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 18:44:13 +08:00
mdbx-windows: fix srw-release if rdt-lock failed (minor/paranoia).
This commit is contained in:
parent
159d676429
commit
d127c28e83
@ -162,7 +162,10 @@ int mdbx_rdt_lock(MDBX_env *env) {
|
|||||||
/* transite from S-? (used) to S-E (locked), e.g. exclusive lock upper-part */
|
/* transite from S-? (used) to S-E (locked), e.g. exclusive lock upper-part */
|
||||||
if (flock(env->me_lfd, LCK_EXCLUSIVE | LCK_WAITFOR, LCK_UPPER))
|
if (flock(env->me_lfd, LCK_EXCLUSIVE | LCK_WAITFOR, LCK_UPPER))
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
return GetLastError();
|
|
||||||
|
int rc = GetLastError();
|
||||||
|
ReleaseSRWLockShared(&env->me_remap_guard);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mdbx_rdt_unlock(MDBX_env *env) {
|
void mdbx_rdt_unlock(MDBX_env *env) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user