BXE: locking and mutexes