ITS#7969 Use __sync_synchronize()

The rest of 9a80a8a8e8
plus commit a937740aa0.
mdb.RE/0.9
leo@yuriev.ru 10 years ago committed by Hallvard Furuseth
parent 3f6fa7aece
commit 086bc04cd2
  1. 5
      libraries/liblmdb/mdb.c

@ -3643,6 +3643,11 @@ mdb_env_write_meta(MDB_txn *txn)
mp->mm_dbs[0] = txn->mt_dbs[0]; mp->mm_dbs[0] = txn->mt_dbs[0];
mp->mm_dbs[1] = txn->mt_dbs[1]; mp->mm_dbs[1] = txn->mt_dbs[1];
mp->mm_last_pg = txn->mt_next_pgno - 1; mp->mm_last_pg = txn->mt_next_pgno - 1;
#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) && /* TODO: portability */ \
!(defined(__i386__) || defined(__x86_64__))
/* LY: issue a memory barrier, if not x86. ITS#7969 */
__sync_synchronize();
#endif
mp->mm_txnid = txn->mt_txnid; mp->mm_txnid = txn->mt_txnid;
if (!(flags & (MDB_NOMETASYNC|MDB_NOSYNC))) { if (!(flags & (MDB_NOMETASYNC|MDB_NOSYNC))) {
unsigned meta_size = env->me_psize; unsigned meta_size = env->me_psize;

Loading…
Cancel
Save