[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-distro-pkg-dev
Subject: /hg/icedtea7: Synchronize access to shared variable
From: omajid () icedtea ! classpath ! org (omajid at icedtea ! classpath ! org)
Date: 2012-06-28 23:48:09
Message-ID: hg.dfdf72956eee.1340927289.2873452341184383833 () icedtea ! classpath ! org
[Download RAW message or body]
changeset dfdf72956eee in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=dfdf72956eee
author: Omair Majid <omajid at redhat.com>
date: Thu Jun 28 19:45:23 2012 -0400
Synchronize access to shared variable
The variable writeInterrupted is accessed everywhere while holding a lock on
'this' object, except in one location. Fix that.
2012-06-28 Omair Majid <omajid at redhat.com>
* pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
(write): Synchronize access to writeInterrupted flag.
diffstat:
ChangeLog | \
5 +++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java \
| 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 3b4d1d6a3b63 -r dfdf72956eee ChangeLog
--- a/ChangeLog Fri Jun 29 00:02:21 2012 +0100
+++ b/ChangeLog Thu Jun 28 19:45:23 2012 -0400
@@ -1,3 +1,8 @@
+2012-06-28 Omair Majid <omajid at redhat.com>
+
+ * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
+ (write): Synchronize access to writeInterrupted flag.
+
2012-06-28 Andrew John Hughes <gnu_andrew at member.fsf.org>
* Makefile.am:
diff -r 3b4d1d6a3b63 -r dfdf72956eee \
pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri \
Jun 29 00:02:21 2012 +0100
+++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu \
Jun 28 19:45:23 2012 -0400 @@ -179,8 +179,10 @@
synchronized (eventLoop.threadLock) {
do {
- if (writeInterrupted) {
- return sizeWritten;
+ synchronized (this) {
+ if (writeInterrupted) {
+ return sizeWritten;
+ }
}
if (availableSize == -1) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic