diff options
author | Miao Wang <miaowang@google.com> | 2017-04-25 16:23:03 -0700 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2017-05-16 15:21:16 -0700 |
commit | 296cd02e03565153f7dff971988adf8e8c6c365a (patch) | |
tree | d2f7f96a961072fd63eab5369d00f8c1246b4f1d /rsHidlAdaptation.h | |
parent | 7098f1f732c677995cdebd7d7f15171052c0cef9 (diff) | |
download | rs-296cd02e03565153f7dff971988adf8e8c6c365a.tar.gz |
Protect static global access with a global flag.
- The global objects are protected by a global flag, during
application teardown.
- The following APIs, which could potentially be called during
application teardown, will be NO-OP if global objects are no
longer alive.
rsContextCreate
rsContextCreateGL
rsContextDestroy
- Added a test of the problematic use-cases.
Detailed discussion:
https://goto.google.com/rs-static-destructor
Test: mm
Test: Before the change to rsApiStubs.cpp, the test hangs during
termination.
Test: After the change to rsApiStubs.cpp, the test passes without any
problems.
Change-Id: I7a43a61d9ccf848c17a88e047e97d087132addda
Diffstat (limited to 'rsHidlAdaptation.h')
-rw-r--r-- | rsHidlAdaptation.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rsHidlAdaptation.h b/rsHidlAdaptation.h index 48c4b6aa..372a298d 100644 --- a/rsHidlAdaptation.h +++ b/rsHidlAdaptation.h @@ -32,6 +32,10 @@ using ::android::hardware::renderscript::V1_0::IContext; * 1. Load the dispatch table with HIDL implementation or CPU fallback. * 2. Convert input paramters to HIDL types, when using HIDL path. * 3. Convert output parameters from HIDL types to RS types, when using HIDL path. + * + * Access of static member objects is protected by global teardown flag. + * https://goto.google.com/rs-static-destructor + * */ class RsHidlAdaptation { |