From 3f3f9cb61a498deab9d17c603fd4520bb714c6e8 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 27 Oct 2004 21:54:12 +0000 Subject: [PATCH] Added Unlock() (an nicer sounding alias for Unset()) and Detach() (the lock is kept when the object is destroyed) to AutoLocker. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9547 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/disk_device_manager/KDiskDeviceUtils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/headers/private/kernel/disk_device_manager/KDiskDeviceUtils.h b/headers/private/kernel/disk_device_manager/KDiskDeviceUtils.h index e59226609c..326e4e9df8 100644 --- a/headers/private/kernel/disk_device_manager/KDiskDeviceUtils.h +++ b/headers/private/kernel/disk_device_manager/KDiskDeviceUtils.h @@ -174,6 +174,17 @@ public: _Unlock(); } + inline void Unlock() + { + _Unlock(); + } + + inline void Detach() + { + fLockable = NULL; + fLocked = false; + } + inline AutoLocker &operator=(Lockable *lockable) { SetTo(lockable);