lock is 32bits long. Using type "long" would promote 64bits on x86_64...