summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2016-04-13 10:15:39 +0900
committerHugo Benichi <hugobenichi@google.com>2016-04-13 11:16:51 +0900
commit67530d6585b9e0d6c63d09cc23e8061b234fef98 (patch)
tree549b311688bd4fe789521277d2ce6eb0557d689f /rs/java/android/renderscript/ScriptIntrinsicHistogram.java
parent6b34b31059fbe21ed947c0213df56e04f6098f59 (diff)
Add volatile qualifier to boolean variable
DHCP receive thread was spinning on a boolean variable to know when to stop. That variable had no volatile qualifier, potentially preventing the thread from stopping at all. Without a volatile qualifier, the reads and writes in halt() could be reordered in such a way that the running thread is interrupted before mStopped is set t true. Also, the optimizer could decide to hoist mStopped in a register inside the running thread, preventing the loop from exiting. Change-Id: I5b30c1247808114f0e5b46e230978ee7ea18ab8e
Diffstat (limited to 'rs/java/android/renderscript/ScriptIntrinsicHistogram.java')
0 files changed, 0 insertions, 0 deletions