summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-17 17:41:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-17 17:41:23 +0100
commita98d7543ad599092081970c48c0c650c142cf762 (patch)
tree2bb29fc2bc8088a39d1f78b1223ad80e5519a981
parent4eb0625d010a65146f727f1ff05c31994d4e12cb (diff)
No need for framework::LockHelper to derive from framework::IMutex
Change-Id: I677abeb9e313b983f750331ec925c24ade04e95b
-rw-r--r--framework/inc/threadhelp/lockhelper.hxx17
-rw-r--r--framework/inc/threadhelp/resetableguard.hxx3
-rw-r--r--framework/source/fwi/threadhelp/lockhelper.cxx2
3 files changed, 5 insertions, 17 deletions
diff --git a/framework/inc/threadhelp/lockhelper.hxx b/framework/inc/threadhelp/lockhelper.hxx
index c64fc45afb9f..777c457ce1ed 100644
--- a/framework/inc/threadhelp/lockhelper.hxx
+++ b/framework/inc/threadhelp/lockhelper.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_FRAMEWORK_INC_THREADHELP_LOCKHELPER_HXX
#include <boost/noncopyable.hpp>
-#include <framework/imutex.hxx>
#include <comphelper/solarmutex.hxx>
#include <fwidllapi.h>
@@ -44,14 +43,9 @@ namespace framework{
An object use an implementation of a fair rw-lock. This increase granularity of t hreadsafe mechanism
and should be used for high performance threadsafe code!
- @implements IMutex
-
- @base IMutex
-
@devstatus draft
*//*-*************************************************************************************************************/
-class FWI_DLLPUBLIC LockHelper : public IMutex
- , private boost::noncopyable
+class FWI_DLLPUBLIC LockHelper : private boost::noncopyable
{
// public methods
@@ -62,13 +56,10 @@ class FWI_DLLPUBLIC LockHelper : public IMutex
// ctor/dtor
LockHelper( comphelper::SolarMutex* pSolarMutex = NULL );
- virtual ~LockHelper( );
-
-
- // interface ::framework::IMutex
+ ~LockHelper( );
- virtual void acquire();
- virtual void release();
+ void acquire();
+ void release();
// something else
diff --git a/framework/inc/threadhelp/resetableguard.hxx b/framework/inc/threadhelp/resetableguard.hxx
index e76afd4ed3f0..d6377c515f4d 100644
--- a/framework/inc/threadhelp/resetableguard.hxx
+++ b/framework/inc/threadhelp/resetableguard.hxx
@@ -35,8 +35,7 @@ namespace framework{
A set bool flag inside protect this implementation against multiple lock() calls
without any unlock()! So the increasing of guarded mutex couldn't be greater then 1 ...
- @attention a) To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
- b) Use interface "IMutex" of set LockHelper only - because we must support an exclusiv locking.
+ @attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
@implements -
diff --git a/framework/source/fwi/threadhelp/lockhelper.cxx b/framework/source/fwi/threadhelp/lockhelper.cxx
index 1486f46c1547..d341fe6bb5b0 100644
--- a/framework/source/fwi/threadhelp/lockhelper.cxx
+++ b/framework/source/fwi/threadhelp/lockhelper.cxx
@@ -85,7 +85,6 @@ LockHelper::~LockHelper()
}
/*-************************************************************************************************************
- @interface IMutex
@short set an exclusiv lock
@descr We must match this lock call with current set lock type and used lock member.
If a mutex should be used - it will be easy ... but if a rw-lock should be used
@@ -105,7 +104,6 @@ void LockHelper::acquire()
}
/*-************************************************************************************************************
- @interface IMutex
@short release exclusiv lock
@descr We must match this unlock call with current set lock type and used lock member.
If a mutex should be used - it will be easy ... but if a rw-lock should be used