summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorLi Li <dualli@google.com>2021-09-07 16:21:35 -0700
committerLi Li <dualli@google.com>2021-09-14 09:18:51 -0700
commitf3925cbfbd166cfea5355ae6b1c282ac1ac65b8f (patch)
treed1f9f51cf276c7414dc7f7bf1acdc5b5cf4ad81f /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent24ccad0ba2eff55dd3b04f2c412e1effce9fd215 (diff)
Freezer: fix binder race
As there isn't an atomic operation to freeze the main thread and binder threads altogether, it's possible the main thread initiates a new binder transaction while the binder threads are already frozen. This race issue will result in failed binder transaction and unexpectedly kill the app. Fix it by rescheduling the ongoing freezing opeartion if there's already an outstanding binder trasaction or new pending binder transactions. At the same time, treat the REPLY transactions of those pending ones the same way as an oneway transaction so that it can successfully reach the frozen process, preventing it from being killed. Bug: 198493121 Test: app launch/foreground/background stress test Change-Id: I1009fa33edbd2b1db14cf51b598f5869d41ee6b6
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions