summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-14 13:26:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-14 14:41:55 +0200
commit61ac80a6f6d1efef7e69d2ded98ae53fe8e5a156 (patch)
tree1515e7905d9553a86411710190b073fbf19a68dd /framework
parent11fd73acce5d8bff7025bb6ddcbaf99d9d70b545 (diff)
ENABLE_MUTEXDEBUG is never defined
Change-Id: I533cc7041177cceff14d1e44e4cd1d25d5e94c11
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/macros/debug.hxx6
-rw-r--r--framework/inc/macros/debug/mutex.hxx101
-rw-r--r--framework/inc/threadhelp/fairrwlock.hxx15
-rw-r--r--framework/source/fwi/threadhelp/lockhelper.cxx2
-rw-r--r--framework/source/fwi/threadhelp/transactionmanager.cxx8
5 files changed, 0 insertions, 132 deletions
diff --git a/framework/inc/macros/debug.hxx b/framework/inc/macros/debug.hxx
index ca1e457c876f..c56dcf952b7f 100644
--- a/framework/inc/macros/debug.hxx
+++ b/framework/inc/macros/debug.hxx
@@ -70,7 +70,6 @@
#undef ENABLE_WARNINGS
#undef ENABLE_EVENTDEBUG
#undef ENABLE_REGISTRATIONDEBUG
- #undef ENABLE_MUTEXDEBUG
// #undef ENABLE_TIMEMEASURE
#undef ENABLE_MEMORYMEASURE
#undef ENABLE_FILTERDBG
@@ -99,11 +98,6 @@
#include <macros/debug/registration.hxx>
//*****************************************************************************************************************
-// special macros to debug threading mechanism
-//*****************************************************************************************************************
-#include <macros/debug/mutex.hxx>
-
-//*****************************************************************************************************************
// special macros to debug our filter cache!
//*****************************************************************************************************************
#include <macros/debug/filterdbg.hxx>
diff --git a/framework/inc/macros/debug/mutex.hxx b/framework/inc/macros/debug/mutex.hxx
deleted file mode 100644
index ddaf33283f89..000000000000
--- a/framework/inc/macros/debug/mutex.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef __FRAMEWORK_MACROS_DEBUG_MUTEX_HXX_
-#define __FRAMEWORK_MACROS_DEBUG_MUTEX_HXX_
-
-//*****************************************************************************************************************
-// special macros for mutex handling
-//*****************************************************************************************************************
-
-#ifdef ENABLE_MUTEXDEBUG
-
- #include <rtl/strbuf.hxx>
-
- /*_____________________________________________________________________________________________________________
- LOGFILE_MUTEX
-
- For follow macros we need a special log file. If user forget to specify anyone, we must do it for him!
- _____________________________________________________________________________________________________________*/
-
- #ifndef LOGFILE_MUTEX
- #define LOGFILE_MUTEX "mutex.log"
- #endif
-
- /*_____________________________________________________________________________________________________________
- LOG_LOCKTYPE( _EFALLBACK, _ECURRENT )
-
- Write information about current set lock type for whole framework project to special file.
- _____________________________________________________________________________________________________________*/
-
- #define LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) \
- /* new scope to prevent us against multiple definitions of variables ... */ \
- { \
- OStringBuffer _sBuffer( 256 ); \
- _sBuffer.append( "Set framework lock type to fallback: \"" ); \
- switch( _EFALLBACK ) \
- { \
- case E_NOTHING : _sBuffer.append( "E_NOTHING" ); \
- break; \
- case E_OWNMUTEX : _sBuffer.append( "E_OWNMUTEX" ); \
- break; \
- case E_SOLARMUTEX : _sBuffer.append( "E_SOLARMUTEX" ); \
- break; \
- case E_FAIRRWLOCK : _sBuffer.append( "E_FAIRRWLOCK" ); \
- break; \
- } \
- _sBuffer.append( "\"\n" ); \
- if( _EFALLBACK != _ECURRENT ) \
- { \
- _sBuffer.append( "... environment overwrite framework lock type with: \"" ); \
- switch( _ECURRENT ) \
- { \
- case E_NOTHING : _sBuffer.append( "E_NOTHING" ); \
- break; \
- case E_OWNMUTEX : _sBuffer.append( "E_OWNMUTEX" ); \
- break; \
- case E_SOLARMUTEX : _sBuffer.append( "E_SOLARMUTEX" ); \
- break; \
- case E_FAIRRWLOCK : _sBuffer.append( "E_FAIRRWLOCK" ); \
- break; \
- } \
- _sBuffer.append( "\"\n" ); \
- } \
- else \
- { \
- _sBuffer.append( "... use fallback, because user don't set another value!\n" ); \
- } \
- WRITE_LOGFILE( LOGFILE_MUTEX, _sBuffer.makeStringAndClear() ) \
- }
-
-#else // #ifdef ENABLE_MUTEXDEBUG
-
- /*_____________________________________________________________________________________________________________
- If right testmode is'nt set - implements these macro with normal functionality!
- We need the guard but not the log mechanism.
- _____________________________________________________________________________________________________________*/
-
- #undef LOGFILE_MUTEX
- #define LOG_LOCKTYPE( _EFALLBACK, _ECURRENT )
-
-#endif // #ifdef ENABLE_MUTEXDEBUG
-
-#endif // #ifndef __FRAMEWORK_MACROS_DEBUG_MUTEX_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/threadhelp/fairrwlock.hxx b/framework/inc/threadhelp/fairrwlock.hxx
index 61b3b52012a2..4e4e5d79a31c 100644
--- a/framework/inc/threadhelp/fairrwlock.hxx
+++ b/framework/inc/threadhelp/fairrwlock.hxx
@@ -163,11 +163,6 @@ class FairRWLock : public IRWLock
// Used condition will open by last gone reader object.
m_aSerializer.acquire();
m_aWriteCondition.wait();
-
- #ifdef ENABLE_MUTEXDEBUG
- // A writer is an exclusiv accessor!
- LOG_ASSERT2( m_nReadCount!=0, "FairRWLock::acquireWriteAccess()", "No threadsafe code detected ... : Read count != 0!" )
- #endif
}
/*-****************************************************************************************************//**
@@ -189,11 +184,6 @@ class FairRWLock : public IRWLock
// by these mutex!
// You don't need any other mutex here - you are the only one in the moment!
- #ifdef ENABLE_MUTEXDEBUG
- // A writer is an exclusiv accessor!
- LOG_ASSERT2( m_nReadCount!=0, "FairRWLock::releaseWriteAccess()", "No threadsafe code detected ... : Read count != 0!" )
- #endif
-
m_aSerializer.release();
}
@@ -221,11 +211,6 @@ class FairRWLock : public IRWLock
// We can't check it - but otherwise it's your problem ...
// Thats why you don't need any mutex here.
- #ifdef ENABLE_MUTEXDEBUG
- // A writer is an exclusiv accessor!
- LOG_ASSERT2( m_nReadCount!=0, "FairRWLock::downgradeWriteAccess()", "No threadsafe code detected ... : Read count != 0!" )
- #endif
-
// Register himself as "new" reader.
// This value must be 0 before - because we support single writer access only!
++m_nReadCount;
diff --git a/framework/source/fwi/threadhelp/lockhelper.cxx b/framework/source/fwi/threadhelp/lockhelper.cxx
index d32fafb170e2..900fef47d2c4 100644
--- a/framework/source/fwi/threadhelp/lockhelper.cxx
+++ b/framework/source/fwi/threadhelp/lockhelper.cxx
@@ -506,8 +506,6 @@ ELockType& LockHelper::implts_getLockType()
eType = (ELockType)(sValue.toInt32());
}
- LOG_LOCKTYPE( FALLBACK_LOCKTYPE, eType )
-
pType = &eType;
}
}
diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx
index 7f3ac4838ac4..5c1ccfb1b88c 100644
--- a/framework/source/fwi/threadhelp/transactionmanager.cxx
+++ b/framework/source/fwi/threadhelp/transactionmanager.cxx
@@ -200,10 +200,6 @@ void TransactionManager::registerTransaction( EExceptionMode eMode, ERejectReas
// Safe access to internal member.
::osl::MutexGuard aAccessGuard( m_aAccessLock );
- #ifdef ENABLE_MUTEXDEBUG
- LOG_ASSERT2( m_nTransactionCount<0, "TransactionManager::acquire()", "Wrong ref count detected!" )
- #endif
-
// Register this new transaction.
// If it is the first one .. close gate to disable changing of working mode.
++m_nTransactionCount;
@@ -231,10 +227,6 @@ void TransactionManager::unregisterTransaction() throw( css::uno::RuntimeExcept
// Safe access to internal member.
::osl::MutexGuard aAccessGuard( m_aAccessLock );
- #ifdef ENABLE_MUTEXDEBUG
- LOG_ASSERT2( m_nTransactionCount<=0, "TransactionManager::release()", "Wrong ref count detected!" )
- #endif
-
// Deregister this transaction.
// If it was the last one ... open gate to enable changing of working mode!
// (see setWorkingMode())