summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-06-13 06:57:06 +0000
committerOliver Bolte <obo@openoffice.org>2007-06-13 06:57:06 +0000
commitba5fc6b315ba600b12c2a81dc33466fbc8ee0008 (patch)
treeb465a6f99b49a2bc050bbfa14c6a679d81e21ce4 /jvmfwk
parent78ef2186af596d3a34127bb48477cde9d3958edd (diff)
INTEGRATION: CWS jl64 (1.21.24); FILE MERGED
2007/06/07 07:53:12 jl 1.21.24.1: #i76390# support of new bootstrap variable UNO_JAVA_JFW_INSTALL_DATA and UNO_JAVA_JFW_INSTALL_EXPIRE
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx21
1 files changed, 4 insertions, 17 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 810d9769d..b0d1a1630 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sunjavaplugin.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 17:45:56 $
+ * last change: $Author: obo $ $Date: 2007-06-13 07:57:06 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -71,20 +71,7 @@ using namespace jfw_plugin;
namespace {
-struct Init
-{
- osl::Mutex * operator()()
- {
- static osl::Mutex aInstance;
- return &aInstance;
- }
-};
-osl::Mutex * getPluginMutex()
-{
- return rtl_Instance< osl::Mutex, Init, ::osl::MutexGuard,
- ::osl::GetGlobalMutex >::create(
- Init(), ::osl::GetGlobalMutex());
-}
+struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
#if defined UNX
OString getPluginJarPath(
@@ -463,7 +450,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
JavaVM ** ppVm,
JNIEnv ** ppEnv)
{
- osl::MutexGuard guard(getPluginMutex());
+ osl::MutexGuard guard(PluginMutex::get());
// unless errcode is volatile the following warning occurs on gcc:
// warning: variable 'errcode' might be clobbered by `longjmp' or `vfork'
volatile javaPluginError errcode = JFW_PLUGIN_E_NONE;