Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
61ac80a6
Kaydet (Commit)
61ac80a6
authored
May 14, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ENABLE_MUTEXDEBUG is never defined
Change-Id: I533cc7041177cceff14d1e44e4cd1d25d5e94c11
üst
11fd73ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
132 deletions
+0
-132
debug.hxx
framework/inc/macros/debug.hxx
+0
-6
mutex.hxx
framework/inc/macros/debug/mutex.hxx
+0
-101
fairrwlock.hxx
framework/inc/threadhelp/fairrwlock.hxx
+0
-15
lockhelper.cxx
framework/source/fwi/threadhelp/lockhelper.cxx
+0
-2
transactionmanager.cxx
framework/source/fwi/threadhelp/transactionmanager.cxx
+0
-8
No files found.
framework/inc/macros/debug.hxx
Dosyayı görüntüle @
61ac80a6
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
#undef ENABLE_WARNINGS
#undef ENABLE_WARNINGS
#undef ENABLE_EVENTDEBUG
#undef ENABLE_EVENTDEBUG
#undef ENABLE_REGISTRATIONDEBUG
#undef ENABLE_REGISTRATIONDEBUG
#undef ENABLE_MUTEXDEBUG
// #undef ENABLE_TIMEMEASURE
// #undef ENABLE_TIMEMEASURE
#undef ENABLE_MEMORYMEASURE
#undef ENABLE_MEMORYMEASURE
#undef ENABLE_FILTERDBG
#undef ENABLE_FILTERDBG
...
@@ -98,11 +97,6 @@
...
@@ -98,11 +97,6 @@
//*****************************************************************************************************************
//*****************************************************************************************************************
#include <macros/debug/registration.hxx>
#include <macros/debug/registration.hxx>
//*****************************************************************************************************************
// special macros to debug threading mechanism
//*****************************************************************************************************************
#include <macros/debug/mutex.hxx>
//*****************************************************************************************************************
//*****************************************************************************************************************
// special macros to debug our filter cache!
// special macros to debug our filter cache!
//*****************************************************************************************************************
//*****************************************************************************************************************
...
...
framework/inc/macros/debug/mutex.hxx
deleted
100644 → 0
Dosyayı görüntüle @
11fd73ac
/* -*- 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: */
framework/inc/threadhelp/fairrwlock.hxx
Dosyayı görüntüle @
61ac80a6
...
@@ -163,11 +163,6 @@ class FairRWLock : public IRWLock
...
@@ -163,11 +163,6 @@ class FairRWLock : public IRWLock
// Used condition will open by last gone reader object.
// Used condition will open by last gone reader object.
m_aSerializer
.
acquire
();
m_aSerializer
.
acquire
();
m_aWriteCondition
.
wait
();
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
...
@@ -189,11 +184,6 @@ class FairRWLock : public IRWLock
// by these mutex!
// by these mutex!
// You don't need any other mutex here - you are the only one in the moment!
// 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
();
m_aSerializer
.
release
();
}
}
...
@@ -221,11 +211,6 @@ class FairRWLock : public IRWLock
...
@@ -221,11 +211,6 @@ class FairRWLock : public IRWLock
// We can't check it - but otherwise it's your problem ...
// We can't check it - but otherwise it's your problem ...
// Thats why you don't need any mutex here.
// 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.
// Register himself as "new" reader.
// This value must be 0 before - because we support single writer access only!
// This value must be 0 before - because we support single writer access only!
++
m_nReadCount
;
++
m_nReadCount
;
...
...
framework/source/fwi/threadhelp/lockhelper.cxx
Dosyayı görüntüle @
61ac80a6
...
@@ -506,8 +506,6 @@ ELockType& LockHelper::implts_getLockType()
...
@@ -506,8 +506,6 @@ ELockType& LockHelper::implts_getLockType()
eType
=
(
ELockType
)(
sValue
.
toInt32
());
eType
=
(
ELockType
)(
sValue
.
toInt32
());
}
}
LOG_LOCKTYPE
(
FALLBACK_LOCKTYPE
,
eType
)
pType
=
&
eType
;
pType
=
&
eType
;
}
}
}
}
...
...
framework/source/fwi/threadhelp/transactionmanager.cxx
Dosyayı görüntüle @
61ac80a6
...
@@ -200,10 +200,6 @@ void TransactionManager::registerTransaction( EExceptionMode eMode, ERejectReas
...
@@ -200,10 +200,6 @@ void TransactionManager::registerTransaction( EExceptionMode eMode, ERejectReas
// Safe access to internal member.
// Safe access to internal member.
::
osl
::
MutexGuard
aAccessGuard
(
m_aAccessLock
);
::
osl
::
MutexGuard
aAccessGuard
(
m_aAccessLock
);
#ifdef ENABLE_MUTEXDEBUG
LOG_ASSERT2
(
m_nTransactionCount
<
0
,
"TransactionManager::acquire()"
,
"Wrong ref count detected!"
)
#endif
// Register this new transaction.
// Register this new transaction.
// If it is the first one .. close gate to disable changing of working mode.
// If it is the first one .. close gate to disable changing of working mode.
++
m_nTransactionCount
;
++
m_nTransactionCount
;
...
@@ -231,10 +227,6 @@ void TransactionManager::unregisterTransaction() throw( css::uno::RuntimeExcept
...
@@ -231,10 +227,6 @@ void TransactionManager::unregisterTransaction() throw( css::uno::RuntimeExcept
// Safe access to internal member.
// Safe access to internal member.
::
osl
::
MutexGuard
aAccessGuard
(
m_aAccessLock
);
::
osl
::
MutexGuard
aAccessGuard
(
m_aAccessLock
);
#ifdef ENABLE_MUTEXDEBUG
LOG_ASSERT2
(
m_nTransactionCount
<=
0
,
"TransactionManager::release()"
,
"Wrong ref count detected!"
)
#endif
// Deregister this transaction.
// Deregister this transaction.
// If it was the last one ... open gate to enable changing of working mode!
// If it was the last one ... open gate to enable changing of working mode!
// (see setWorkingMode())
// (see setWorkingMode())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment