Is there any function to instead of @synchronized of cocos2d in cocos2d-x?!

The @synchronized directive is a convenient way to create mutex locks on the fly in Objective-C code.
Is there anyway to instead of it in cocos2d-x?!?