mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
ITS#8582 keep mutex at end of struct
since it's variable size on Linux/glibc
This commit is contained in:
parent
3473af00ad
commit
27c3a0ea9f
20
external/db_drivers/liblmdb/mdb.c
vendored
20
external/db_drivers/liblmdb/mdb.c
vendored
@ -809,6 +809,16 @@ typedef struct MDB_txbody {
|
|||||||
uint32_t mtb_magic;
|
uint32_t mtb_magic;
|
||||||
/** Format of this lock file. Must be set to #MDB_LOCK_FORMAT. */
|
/** Format of this lock file. Must be set to #MDB_LOCK_FORMAT. */
|
||||||
uint32_t mtb_format;
|
uint32_t mtb_format;
|
||||||
|
/** The ID of the last transaction committed to the database.
|
||||||
|
* This is recorded here only for convenience; the value can always
|
||||||
|
* be determined by reading the main database meta pages.
|
||||||
|
*/
|
||||||
|
volatile txnid_t mtb_txnid;
|
||||||
|
/** The number of slots that have been used in the reader table.
|
||||||
|
* This always records the maximum count, it is not decremented
|
||||||
|
* when readers release their slots.
|
||||||
|
*/
|
||||||
|
volatile unsigned mtb_numreaders;
|
||||||
#if defined(_WIN32) || defined(MDB_USE_POSIX_SEM)
|
#if defined(_WIN32) || defined(MDB_USE_POSIX_SEM)
|
||||||
char mtb_rmname[MNAME_LEN];
|
char mtb_rmname[MNAME_LEN];
|
||||||
#elif defined(MDB_USE_SYSV_SEM)
|
#elif defined(MDB_USE_SYSV_SEM)
|
||||||
@ -820,16 +830,6 @@ typedef struct MDB_txbody {
|
|||||||
*/
|
*/
|
||||||
mdb_mutex_t mtb_rmutex;
|
mdb_mutex_t mtb_rmutex;
|
||||||
#endif
|
#endif
|
||||||
/** The ID of the last transaction committed to the database.
|
|
||||||
* This is recorded here only for convenience; the value can always
|
|
||||||
* be determined by reading the main database meta pages.
|
|
||||||
*/
|
|
||||||
volatile txnid_t mtb_txnid;
|
|
||||||
/** The number of slots that have been used in the reader table.
|
|
||||||
* This always records the maximum count, it is not decremented
|
|
||||||
* when readers release their slots.
|
|
||||||
*/
|
|
||||||
volatile unsigned mtb_numreaders;
|
|
||||||
} MDB_txbody;
|
} MDB_txbody;
|
||||||
|
|
||||||
/** The actual reader table definition. */
|
/** The actual reader table definition. */
|
||||||
|
Loading…
Reference in New Issue
Block a user