Hi Bahadir...
Would you agree it is pointless from an atomicity perspective, to
acquire the mutex lock by atomic_xchg() in __mutex_lock_common(),
since the mutex is locked by a spinlock earlier?
Not quite sure. Maybe it is done to anticipate architecture that freely
reorder instructions (IIRC, Alpha for example). So to make sure your CPU
does do the assignment and previous value checking BEFORE the if(),
atomic operation all-at-one is by design a good choice
regards,
Mulyadi
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ