#BUGFIX by exept
class: JavaNativeMethodImpl_OpenJDK6 class
changed:
#_sun_misc_Unsafe_compareAndSwapLong:_:_:_:_:_:_:_:
#_sun_misc_Unsafe_compareAndSwapObject:_:_:_:_:_:
bug - interrupt handling was broken
--- a/JavaNativeMethodImpl_OpenJDK6.st Fri Sep 20 15:37:18 2019 +0200
+++ b/JavaNativeMethodImpl_OpenJDK6.st Fri Sep 20 15:37:51 2019 +0200
@@ -19430,19 +19430,20 @@
long expected,
long new);
"
- | o offset expected real new ok |
+ | o offset expected real new ok wasBlocked|
+
o := a1.
offset := a2.
"offset is long, so nativeContext at:3 is dummy nil!!!!!!"
expected := a4.
new := a6.
- OperatingSystem blockInterrupts.
+ wasBlocked := OperatingSystem blockInterrupts.
real := o instVarAt: offset.
(real == expected)
ifTrue:[o instVarAt: offset put: new. ok := 1]
ifFalse:[ok := 1].
- OperatingSystem unblockInterrupts.
+ wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
^ok
"Modified: / 18-10-2011 / 21:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -19462,7 +19463,7 @@
int expected,
int new);
"
- | o offset expected real new ok isArray|
+ | o offset expected real new ok isArray wasBlocked|
o := a1.
offset := a2.
@@ -19470,7 +19471,7 @@
expected := a4.
new := a5.
- OperatingSystem blockInterrupts.
+ wasBlocked := OperatingSystem blockInterrupts.
(isArray := o isArray) ifTrue:[
real := o at: offset.
] ifFalse:[
@@ -19487,7 +19488,7 @@
] ifFalse:[
ok := 0
].
- OperatingSystem unblockInterrupts.
+ wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
^ok
"Modified: / 08-02-2013 / 09:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"