implement mutex using assembly