commit | ca0b45a15ed34495fa74ec4f5fd129e27132c673 | [log] [tgz] |
---|---|---|
author | Tri Vo <trong@google.com> | Tue Nov 27 17:56:56 2018 -0800 |
committer | Tri Vo <trong@google.com> | Wed Nov 28 16:04:12 2018 -0800 |
tree | ec1c7e8fc42cf369ca2b8a6ddaeff71b6cd2bdb5 | |
parent | 3e7f1b1a7941cd6735d0cd9f61bd0392e1d24fa5 [diff] |
Handle concurrent exit and wake lock acquisition. We use "-Wexit-time-destructors" and "-fno-c++-static-destructors" flags to make sure that no static variables are destroyed at exit time. We do this to avoid the race condition between process exit and use of static vars when calling acquire/release_wake_lock(). Bug: 117575503 Test: libpower_test Change-Id: I16acfeb2412685e376d8bd1069c86f60f56d215a