diff options
| author | David Anderson <dvander@google.com> | 2019-08-06 15:44:02 -0700 | 
|---|---|---|
| committer | David Anderson <dvander@google.com> | 2019-08-07 18:42:22 -0700 | 
| commit | d986fefa3b13a7f63793404c7b5ce64519cb3a8e (patch) | |
| tree | e2f89bc29f00a6118c6b75ead7f0be9f036db1cf /libunwindstack/tests/MemoryFileTest.cpp | |
| parent | 3cb682e3698775f0ea80cb6cfac844c6acf91540 (diff) | |
libsnapshot: Eliminate per-snapshot flocks.
Per-snapshot locks don't solve any problems and add a great deal of
complexity. Instead, refactor the Read/WriteSnapshotStatus methods so
the caller just needs the snapshot name, and is not responsible for
opening a file.
As part of this change, callers of WriteSnapshotStatus must always take
an exclusive flock on the update state file. This is enforced by adding
a helper method to LockedFile to check the lock mode.
Bug: 136678799
Test: libsnapshot_test gtest
Change-Id: Icd580aaec7dfc916b3eed174d86b26688cd2291b
Diffstat (limited to 'libunwindstack/tests/MemoryFileTest.cpp')
0 files changed, 0 insertions, 0 deletions
