locking: Allow checking if lock is owned in certain mode
With this patch the “LockSet” and “GanetiLockManager” classes have a new function to check if a single or a group of locks (at a certain level) have been acquired in a specific mode. This will be used for additional assertions. Until now they could only check if a lock has been acquired, but not in which mode. One use-case will be updating the node state in various places, where the node lock must be acquired in exclusive mode. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment