Get two locks at once; in order to prevent deadlock, don't keep one lock if both cannot be obtained.
TODO: Can I make this generic for n locks?
Unlock two locks at once.
Lock one lock and unlock another.
Call a block with Thread.critical set to true; ensure that it is reset to false after.