diff options
author | Hans Boehm <hboehm@google.com> | 2014-07-31 15:53:22 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2014-08-08 11:34:25 -0700 |
commit | 30214b901e8dbec9ec11230187a8e71fc8a04014 (patch) | |
tree | b81bf8ff795f3191c5f139893ffc29b4d4624092 /tests/string_test.cpp | |
parent | 1c5e415f8c4cd2cb10ad1d1cf660d17161132772 (diff) |
Add memory ordering constraint, convert to C11 atomics
Add an ordering constraint/fence to __system_property_serial.
This slows down a read on a Nexus 5 from about 50 to about 70 ns,
but avoids the possibility of seeing an inconsistent property value.
Use C11 atomic operations where easy and appropriate.
This code remains not fully C++11 memory model conformant, but
I would now expect the generated code to now be correct with current compilers.
Bug:14970171
Change-Id: I0891ff1d0f914ae5c3857e3d76b6a7c8a4a07d83
Diffstat (limited to 'tests/string_test.cpp')
0 files changed, 0 insertions, 0 deletions