Implement mutex lock and test method without using ldrex and strex