#DOCUMENTATION by exept cvs_MAIN
authorClaus Gittinger <cg@exept.de>
Fri, 20 Sep 2019 15:37:18 +0200
branchcvs_MAIN
changeset 3963 f96bd18869e8
parent 3962 a02c0cd92786
child 3964 99d20fdeb4b7
#DOCUMENTATION by exept class: JavaVM class comment/format in: #monitorEnter:in: #monitorExit:in: #park:timeout: #unpark: #waitFor:state:timeOut: #waitOn:forTimeout:state:
JavaVM.st
--- a/JavaVM.st	Wed Sep 11 16:54:22 2019 +0200
+++ b/JavaVM.st	Fri Sep 20 15:37:18 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -4175,14 +4177,13 @@
             severity:Logger severityTRACE
             facility:#JVM.
     ].
+
     wasBlocked := OperatingSystem blockInterrupts.
-
     "/ Ensure any eventual thinlock is inflated here...
     someObject getJavaMonitor.
-
     "/ Now, we're sure that the lock is fat JavaMonitor, enter it
     self enterMonitor:someObject ofProcess:thisProcess.
-"/    aJavaContext notNil ifTrue:[aJavaContext addMonitor:someObject].
+    "/ aJavaContext notNil ifTrue:[aJavaContext addMonitor:someObject].
 
     wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
 
@@ -4221,7 +4222,7 @@
 
     wasBlocked := OperatingSystem blockInterrupts.
     self leaveMonitor: someObject ofProcess: thisProcess.
-"/    aJavaContext notNil ifTrue:[aJavaContext removeMonitor: someObject].
+    "/ aJavaContext notNil ifTrue:[aJavaContext removeMonitor: someObject].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 
     MonitorTrace ifTrue: [
@@ -4343,6 +4344,7 @@
     "wait"
 
     | wasBlocked  thisProcess  mon |
+
     thisProcess := Processor activeProcess.
     thisProcess isInterrupted ifTrue: [
         thisProcess clearInterrupted.
@@ -4792,6 +4794,7 @@
     "wait"
 
     | wasBlocked  thisProcess  releasedCount  acquiredCount |
+
     thisProcess := Processor activeProcess.
     wasBlocked := OperatingSystem blockInterrupts.
     releasedCount := self countAcquiredMonitorsOfProcess: thisProcess.
@@ -4903,12 +4906,12 @@
 park: process timeout: tout
     "A helper for sun.misc.Unsafe.park()"
 
-    | blocked sema |
-
-    blocked := OperatingSystem blockInterrupts.
+    | wasBlocked sema |
+
+    wasBlocked := OperatingSystem blockInterrupts.
     ParkUnparkSemaphores isNil ifTrue:[ ParkUnparkSemaphores := Dictionary new ].
     sema := ParkUnparkSemaphores at: process ifAbsentPut:[Semaphore new].
-    blocked ifFalse:[ OperatingSystem unblockInterrupts ].
+    wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
 
     Logger log: 'parking thread ', process printString severity: Logger severityDEBUG facility: #JVM.
     sema parkWithTimeoutMs: tout.
@@ -4994,12 +4997,12 @@
 unpark: process
     "A helper for sun.misc.Unsafe.unpark()"
 
-    | blocked sema |
-
-    blocked := OperatingSystem blockInterrupts.
+    | wasBlocked sema |
+
+    wasBlocked := OperatingSystem blockInterrupts.
     ParkUnparkSemaphores isNil ifTrue:[ ParkUnparkSemaphores := Dictionary new ].
     sema := ParkUnparkSemaphores at: process ifAbsentPut:[Semaphore new].
-    blocked ifFalse:[ OperatingSystem unblockInterrupts ].
+    wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
 
     Logger log: 'unparking thread ', process printString severity: Logger severityDEBUG facility: #JVM.
     sema signal.