10 Feb
2010
10 Feb
'10
8:19 p.m.
Hi! 9 февр. 2010, в 15:45, Michael Widenius написал(а): [skip]
+ 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?