mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-19 22:39:04 +08:00
mdbx: fix/rework exclusive-locking for Windows.
Change-Id: I1b129a10ed7523024481480647317f1643f2ea70
This commit is contained in:
committed by
Leo Yuriev
parent
17e8429a29
commit
c8a5df650b
@@ -91,7 +91,9 @@ static __inline int mdbx_lck_shared(int lfd) {
|
||||
return mdbx_lck_op(lfd, F_SETLKW, F_RDLCK, 0, 1);
|
||||
}
|
||||
|
||||
int mdbx_lck_downgrade(MDBX_env *env) { return mdbx_lck_shared(env->me_lfd); }
|
||||
int mdbx_lck_downgrade(MDBX_env *env, bool complete) {
|
||||
return complete ? mdbx_lck_shared(env->me_lfd) : MDBX_SUCCESS;
|
||||
}
|
||||
|
||||
int mdbx_lck_upgrade(MDBX_env *env) { return mdbx_lck_exclusive(env->me_lfd); }
|
||||
|
||||
|
Reference in New Issue
Block a user