aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-11 00:47:37 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-11 00:47:37 +0200
commitc7750b25708bfa0f59f887084773a3c1b600b125 (patch)
treef6efbf72e0c6284274150ea30c2af91b5143ef26
parentMerge pull request #1693 (diff)
parentITS#8582 keep mutex at end of struct (diff)
downloadmonero-c7750b25708bfa0f59f887084773a3c1b600b125.tar.xz
Merge pull request #1694
27c3a0ea ITS#8582 keep mutex at end of struct (Howard Chu)
-rw-r--r--external/db_drivers/liblmdb/mdb.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/external/db_drivers/liblmdb/mdb.c b/external/db_drivers/liblmdb/mdb.c
index d778037b0..c2408f917 100644
--- a/external/db_drivers/liblmdb/mdb.c
+++ b/external/db_drivers/liblmdb/mdb.c
@@ -809,6 +809,16 @@ typedef struct MDB_txbody {
uint32_t mtb_magic;
/** Format of this lock file. Must be set to #MDB_LOCK_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)
char mtb_rmname[MNAME_LEN];
#elif defined(MDB_USE_SYSV_SEM)
@@ -820,16 +830,6 @@ typedef struct MDB_txbody {
*/
mdb_mutex_t mtb_rmutex;
#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;
/** The actual reader table definition. */