Files
libreoffice/extensions/source/ole/ole2uno.cxx

44 lines
717 B
C++
Raw Normal View History

#include "osl/getglobalmutex.hxx"
#include "rtl/instance.hxx"
2002-06-05 12:21:38 +00:00
#include "ole2uno.hxx"
using namespace osl;
namespace ole_adapter
{
struct MutexInit
2002-06-05 12:21:38 +00:00
{
Mutex * operator () ()
2002-06-05 12:21:38 +00:00
{
static Mutex aInstance;
return &aInstance;
2002-06-05 12:21:38 +00:00
}
};
Mutex * getBridgeMutex()
{
return rtl_Instance< Mutex, MutexInit, ::osl::MutexGuard,
::osl::GetGlobalMutex >::create(
MutexInit(), ::osl::GetGlobalMutex());
2002-06-05 12:21:38 +00:00
}
// Mutex* getBridgeMutex()
// {
// static Mutex* pMutex= NULL;
// if( ! pMutex)
// {
// MutexGuard guard( Mutex::getGlobalMutex() );
// if( !pMutex)
// {
// static Mutex aMutex;
// pMutex= &aMutex;
// }
// }
// return pMutex;
// }
2002-06-05 12:21:38 +00:00
}