mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-01-28 02:49:23 +00:00
mdbx: добавление кода системной ошибки MDBX_EDEADLK
.
This commit is contained in:
parent
4b79d46d38
commit
796e56b9b9
6
mdbx.h
6
mdbx.h
@ -1950,7 +1950,8 @@ enum MDBX_error_t {
|
|||||||
MDBX_EPERM = ERROR_INVALID_FUNCTION,
|
MDBX_EPERM = ERROR_INVALID_FUNCTION,
|
||||||
MDBX_EINTR = ERROR_CANCELLED,
|
MDBX_EINTR = ERROR_CANCELLED,
|
||||||
MDBX_ENOFILE = ERROR_FILE_NOT_FOUND,
|
MDBX_ENOFILE = ERROR_FILE_NOT_FOUND,
|
||||||
MDBX_EREMOTE = ERROR_REMOTE_STORAGE_MEDIA_ERROR
|
MDBX_EREMOTE = ERROR_REMOTE_STORAGE_MEDIA_ERROR,
|
||||||
|
MDBX_EDEADLK = ERROR_POSSIBLE_DEADLOCK
|
||||||
#else /* Windows */
|
#else /* Windows */
|
||||||
#ifdef ENODATA
|
#ifdef ENODATA
|
||||||
MDBX_ENODATA = ENODATA,
|
MDBX_ENODATA = ENODATA,
|
||||||
@ -1966,7 +1967,8 @@ enum MDBX_error_t {
|
|||||||
MDBX_EPERM = EPERM,
|
MDBX_EPERM = EPERM,
|
||||||
MDBX_EINTR = EINTR,
|
MDBX_EINTR = EINTR,
|
||||||
MDBX_ENOFILE = ENOENT,
|
MDBX_ENOFILE = ENOENT,
|
||||||
MDBX_EREMOTE = ENOTBLK
|
MDBX_EREMOTE = ENOTBLK,
|
||||||
|
MDBX_EDEADLK = EDEADLK
|
||||||
#endif /* !Windows */
|
#endif /* !Windows */
|
||||||
};
|
};
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
@ -190,7 +190,7 @@ int osal_txn_lock(MDBX_env *env, bool dontwait) {
|
|||||||
0xC0000194 /* STATUS_POSSIBLE_DEADLOCK / EXCEPTION_POSSIBLE_DEADLOCK */)
|
0xC0000194 /* STATUS_POSSIBLE_DEADLOCK / EXCEPTION_POSSIBLE_DEADLOCK */)
|
||||||
? EXCEPTION_EXECUTE_HANDLER
|
? EXCEPTION_EXECUTE_HANDLER
|
||||||
: EXCEPTION_CONTINUE_SEARCH) {
|
: EXCEPTION_CONTINUE_SEARCH) {
|
||||||
return ERROR_POSSIBLE_DEADLOCK;
|
return MDBX_EDEADLK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ MDBX_INTERNAL_FUNC int osal_fastmutex_acquire(osal_fastmutex_t *fastmutex) {
|
|||||||
0xC0000194 /* STATUS_POSSIBLE_DEADLOCK / EXCEPTION_POSSIBLE_DEADLOCK */)
|
0xC0000194 /* STATUS_POSSIBLE_DEADLOCK / EXCEPTION_POSSIBLE_DEADLOCK */)
|
||||||
? EXCEPTION_EXECUTE_HANDLER
|
? EXCEPTION_EXECUTE_HANDLER
|
||||||
: EXCEPTION_CONTINUE_SEARCH) {
|
: EXCEPTION_CONTINUE_SEARCH) {
|
||||||
return ERROR_POSSIBLE_DEADLOCK;
|
return MDBX_EDEADLK;
|
||||||
}
|
}
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user