In addition to the current self-consistency checks (recursive locking, lock ordering graph check), it might be useful to allow the developer to specify certain conditions that are checked every time a lock is being acquired. For example:
In tricky code where the developer knows the desired relationship between different lock classes and locks.