summaryrefslogtreecommitdiffstats
path: root/libjava/java/lang
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-12 12:34:41 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-12 12:34:41 +0000
commit03826b0a4b0c85d5edfce125d9d70736c6d1249b (patch)
tree5a6ff6239742067af3dc7d23a0bdf76018a495aa /libjava/java/lang
parentb8f0cc2d96769bbe14fba8469cf4a669b2fcdd2a (diff)
downloadppe42-gcc-03826b0a4b0c85d5edfce125d9d70736c6d1249b.tar.gz
ppe42-gcc-03826b0a4b0c85d5edfce125d9d70736c6d1249b.zip
* java/lang/natSystem.cc (SystemClass): New define.
(init_properties): Synchronize. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang')
-rw-r--r--libjava/java/lang/natSystem.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc
index 5f613d53ead..6ceb6421074 100644
--- a/libjava/java/lang/natSystem.cc
+++ b/libjava/java/lang/natSystem.cc
@@ -45,6 +45,9 @@ details. */
#include <java/io/PrintStream.h>
#include <java/io/InputStream.h>
+#define SystemClass _CL_Q34java4lang6System
+extern java::lang::Class SystemClass;
+
#if defined (ECOS)
@@ -175,9 +178,13 @@ java::lang::System::identityHashCode (jobject obj)
void
java::lang::System::init_properties (void)
{
- if (prop_init)
- return;
- prop_init = true;
+ {
+ // We only need to synchronize around this gatekeeper.
+ JvSynchronize sync (&SystemClass);
+ if (prop_init)
+ return;
+ prop_init = true;
+ }
properties = new java::util::Properties ();
// A convenience define.
OpenPOWER on IntegriCloud