commit | 9c8f34448e0e2b0b0b0094d75dadc3116f5610fa | [log] [tgz] |
---|---|---|
author | Alex Light <allight@google.com> | Thu Apr 04 15:01:42 2019 -0700 |
committer | Alex Light <allight@google.com> | Thu Apr 04 15:11:15 2019 -0700 |
tree | 54cc8bd2990af9ca030fee3ec27e82181ef22067 | |
parent | 3fa8b6db7b556035f192d037b35210677250798e [diff] |
Use RAII for preventing user-code suspensions In some places we want to prevent a thread from being suspended by a kForUserCode suspension. Doing this requires gaining a lock, checking our current suspension state and possibly retrying. To simplify this we added a new RAII ScopedNoUserCodeSuspension capability that does the needed checks. Test: ./test.py --host Change-Id: I48c08bc8f99b3574d241e7bfc6945b3358b6d082