Mutex implementation (without timeouts).