lock
Locks @mutex. If @mutex is already locked by another thread, the current thread will block until @mutex is unlocked by the other thread. If @mutex is already locked by the calling thread, this functions increases the depth of @mutex and returns immediately.