> lock(l1) > do something > unlock(l1) > > lock(l2) > do something else > unlock(l2) > > will gcc ever move the lock(l2) before the unlock(l1)? well, bad example, since l1 and l2 are both volatile, but in general, nothing will prevent part of "do something else" to happen inside the l1 lock, right? randolph