From ba5fc6b315ba600b12c2a81dc33466fbc8ee0008 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Wed, 13 Jun 2007 06:57:06 +0000 Subject: 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 --- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'jvmfwk') 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 {}; #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; -- cgit v1.2.3