create () returns a new, unlocked mutex.
equal is phys_equal
current_thread_has_lock t returns true iff the current thread has t locked.
lock t locks the mutex t, blocking until it can be locked. lock immediately
returns Error if the current thread already holds t.
try_lock t locks t if it can immediately do so. The result indicates whether
try_lock succeeded in acquiring the lock. try_lock returns Error if the current
thread already holds t.
unlock t unlocks t, if the current thread holds it. unlock returns Error if
the lock is not held by the calling thread.