diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:15:13 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:15:13 +0000 |
commit | 78022820b15471f2bf0f7dcc356b833361237425 (patch) | |
tree | 667da614e0b02d26ecda328e1fed4d167e7575f6 /sal | |
parent | ddf10f346487b1c670750d9879c5c03ee7715f1c (diff) |
INTEGRATION: CWS tune04 (1.5.270); FILE MERGED
2004/06/14 07:24:14 cmc 1.5.270.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/source/logfile.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sal/rtl/source/logfile.cxx b/sal/rtl/source/logfile.cxx index f41189ad028f..67a7d99b431b 100644 --- a/sal/rtl/source/logfile.cxx +++ b/sal/rtl/source/logfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: logfile.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2004-06-17 13:28:10 $ + * last change: $Author: hjs $ $Date: 2004-06-25 17:15:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -127,9 +127,8 @@ LoggerGuard::~LoggerGuard() g_bHasBeenCalled = sal_False; } } - -static LoggerGuard guard; } + using namespace rtl; static Mutex & getLogMutex() @@ -198,6 +197,9 @@ extern "C" void SAL_CALL rtl_logfile_trace ( const char *pszFormat, ... ) if( osl_File_E_None == e ) { TimeValue aCurrentTime; + //Allocing a g_buffer implies the need for a LoggerGuard, this + //method is already double-locked, so no need for rtl::Static + static LoggerGuard guard; g_buffer = ( sal_Char * ) rtl_allocateMemory( g_BUFFERSIZE ); sal_Int64 nConverted = 0; sal_Int64 nWritten = 0; |