Is there a way to do mutex in Monkey C?

I want to control access to a shared resource that may be accessed by the main proces and the background process. Is there any way to do a mutex in Monkey C?