Skip to content

Commit 82fe9b8

Browse files
add comments to indicate where we've diverged from upstream
1 parent 50175ad commit 82fe9b8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: libraries/liblmdb/mdb.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -809,11 +809,11 @@ typedef struct MDB_rxbody {
809809
* started from so we can avoid overwriting any data used in that
810810
* particular version.
811811
*/
812-
_Atomic txnid_t mrb_txnid;
812+
_Atomic txnid_t mrb_txnid; // Changed to _Atomic to support IndexStoreDB
813813
/** The process ID of the process owning this reader txn. */
814-
_Atomic MDB_PID_T mrb_pid;
814+
_Atomic MDB_PID_T mrb_pid; // Changed to _Atomic to support IndexStoreDB
815815
/** The thread ID of the thread owning this txn. */
816-
_Atomic MDB_THR_T mrb_tid;
816+
_Atomic MDB_THR_T mrb_tid; // Changed to _Atomic to support IndexStoreDB
817817
} MDB_rxbody;
818818

819819
/** The actual reader record, with cacheline padding. */
@@ -853,12 +853,12 @@ typedef struct MDB_txbody {
853853
* This is recorded here only for convenience; the value can always
854854
* be determined by reading the main database meta pages.
855855
*/
856-
_Atomic txnid_t mtb_txnid;
856+
_Atomic txnid_t mtb_txnid; // Changed to _Atomic to support IndexStoreDB
857857
/** The number of slots that have been used in the reader table.
858858
* This always records the maximum count, it is not decremented
859859
* when readers release their slots.
860860
*/
861-
_Atomic unsigned mtb_numreaders;
861+
_Atomic unsigned mtb_numreaders; // Changed to _Atomic to support IndexStoreDB
862862
#if defined(_WIN32) || defined(MDB_USE_POSIX_SEM)
863863
/** Binary form of names of the reader/writer locks */
864864
mdb_hash_t mtb_mutexid;
@@ -1249,7 +1249,7 @@ typedef struct MDB_meta {
12491249
* Actually the file may be shorter if the freeDB lists the final pages.
12501250
*/
12511251
pgno_t mm_last_pg;
1252-
_Atomic txnid_t mm_txnid; /**< txnid that committed this page */
1252+
_Atomic txnid_t mm_txnid; /**< txnid that committed this page */ // Changed to _Atomic to support IndexStoreDB
12531253
} MDB_meta;
12541254

12551255
/** Buffer for a stack-allocated meta page.
@@ -1510,7 +1510,7 @@ struct MDB_env {
15101510
unsigned int me_os_psize; /**< OS page size, from #GET_PAGESIZE */
15111511
unsigned int me_maxreaders; /**< size of the reader table */
15121512
/** Max #MDB_txninfo.%mti_numreaders of interest to #mdb_env_close() */
1513-
_Atomic int me_close_readers;
1513+
_Atomic int me_close_readers; // Changed to _Atomic to support IndexStoreDB
15141514
MDB_dbi me_numdbs; /**< number of DBs opened */
15151515
MDB_dbi me_maxdbs; /**< size of the DB table */
15161516
MDB_PID_T me_pid; /**< process ID of this env */
@@ -10111,7 +10111,7 @@ typedef struct mdb_copy {
1011110111
/** Error code. Never cleared if set. Both threads can set nonzero
1011210112
* to fail the copy. Not mutex-protected, LMDB expects atomic int.
1011310113
*/
10114-
_Atomic int mc_error;
10114+
_Atomic int mc_error; // Changed to _Atomic to support IndexStoreDB
1011510115
} mdb_copy;
1011610116

1011710117
/** Dedicated writer thread for compacting copy. */

0 commit comments

Comments
 (0)