There is no replacement mechanism, except maybe passing the lock around explicitly via parameters and then using callbacks that lack the parameter so that callbacks cannot acquire the lock.
The lock levels mechanism wasn't used much, further complicated the type system and I'm not aware of a single realworld case where it actually prevented a deadlock at compile-time.
