← Back to team overview

maria-developers team mailing list archive

Re: Rev 2740: Group commit for maria storage engine. in file:///Users/bell/maria/bzr/work-maria-5.2-groupcommit/



9 февр. 2010, в 15:45, Michael Widenius написал(а):
+      my_atomic_rwlock_wrlock(&soft_sync_rwl);
+      my_atomic_store32(&soft_sync_min, fileno);
+      my_atomic_store32(&soft_sync_max, fileno);
+      my_atomic_rwlock_wrunlock(&soft_sync_rwl);

Don't understand why my_atomic_rwlock_wrlock is enough protection here.
Why use my_atomic_store32 ?

As I understood idea of atomic operation it is guaranted that we will read consistent value (not one byte from one value and other one from other). Yes I remember your statement that on modern 32bit system you always get it consistent, then why we made atomic operations at all?