I think you should read this http://www.cplusplus.com/forum/unices/90343/ topic, i think it's about the same thing you are asking.
The mutex does not guarantee that you will not be able to do that thing between the mutex loc and unlock. It's your duty to make sure that the whatever is between your lock /release is only done once.
For example your code should loke like:
suppose T1 locks(A) and will T2 wait for T1 to release the lock.
Yes, it will, that's the whole point: if T2 attempts to acquire a mutex that's currently held by T1, T2 goes to sleep until the mutex is released by T1.