From 8de72f9d586809e8fe1040fc458b19422b79026e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 1 Dec 2009 16:32:48 +0000 Subject: [PATCH] * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34416 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/util/AutoLock.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/headers/private/kernel/util/AutoLock.h b/headers/private/kernel/util/AutoLock.h index 9c66268ed7..5eedfb2df2 100644 --- a/headers/private/kernel/util/AutoLock.h +++ b/headers/private/kernel/util/AutoLock.h @@ -1,5 +1,5 @@ /* - * Copyright 2008, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2008-2009, Axel Dörfler, axeld@pinc-software.de. * Copyright 2005-2007, Ingo Weinhold, bonefish@users.sf.net. All rights reserved. * * Distributed under the terms of the MIT License. @@ -19,7 +19,7 @@ namespace BPrivate { -// MutexLocking + class MutexLocking { public: inline bool Lock(mutex *lockable) @@ -33,10 +33,9 @@ public: } }; -// MutexLocker typedef AutoLocker MutexLocker; -// RecursiveLockLocking + class RecursiveLockLocking { public: inline bool Lock(recursive_lock *lockable) @@ -50,9 +49,9 @@ public: } }; -// RecursiveLocker typedef AutoLocker RecursiveLocker; + class ReadWriteLockReadLocking { public: inline bool Lock(rw_lock *lockable) @@ -82,7 +81,7 @@ public: typedef AutoLocker ReadLocker; typedef AutoLocker WriteLocker; -// InterruptsLocking + class InterruptsLocking { public: inline bool Lock(int* lockable) @@ -97,7 +96,7 @@ public: } }; -// InterruptsLocker + class InterruptsLocker : public AutoLocker { public: inline InterruptsLocker(bool alreadyLocked = false, @@ -111,7 +110,7 @@ private: int fState; }; -// SpinLocking + class SpinLocking { public: inline bool Lock(spinlock* lockable) @@ -126,10 +125,9 @@ public: } }; -// SpinLocker typedef AutoLocker SpinLocker; -// InterruptsSpinLocking + class InterruptsSpinLocking { public: // NOTE: work-around for annoying GCC 4 "fState may be used uninitialized" @@ -159,10 +157,9 @@ private: int fState; }; -// InterruptsSpinLocker typedef AutoLocker InterruptsSpinLocker; -// ThreadCPUPinLocking + class ThreadCPUPinLocking { public: inline bool Lock(struct thread* thread) @@ -177,9 +174,9 @@ public: } }; -// MutexLocker typedef AutoLocker ThreadCPUPinner; + } // namespace BPrivate using BPrivate::AutoLocker;