History log of /bionic/libc/bionic/system_properties.cpp
Revision Date Author Comments
123927dffc28018a1feb1d42c625b601cb948f34 24-Apr-2015 Mark Salyzyn <salyzyn@google.com> bionic: add __system_property_area_serial()

Adds a new _internal_ function. Provide a global serial number to
support more efficient private caching algorithms. This allows
to skip re-running the __system_property_find() call on misses until
there is a global change in the properties. This call is a read
barrier, the property data to be read following this call will be
read sequentially and up to date.

(Cherry pick from bfd65279a5a9018b01f71773270e462f1b9a7768)

Bug: 19544788
Change-Id: I58e6a92baa0f3e8e7b9ec79b10af6d56407dab48
b8ce47421727f7621f3e00043d535e35cd904852 11-Feb-2015 Yabin Cui <yabinc@google.com> Switch system_properties.cpp from bionic atomic operations to stdatomic.

Bug: 17177189
Change-Id: I42e05ad1c490cc7a8040138151afc0ee72a9b63f
748fbe5c41d97433dc756a50812e1caf6a6ef727 23-Sep-2014 Elliott Hughes <enh@google.com> Fix a couple more cases of missing CLOEXEC.

The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.

Bug: 18186310

(cherry picked from commit 0dc39f9952c5e3a3121ea77357bb264ef0f8ded7)

Change-Id: I3e84488fc246f6c28cbd82e96d0cd4343a12c28a
0dc39f9952c5e3a3121ea77357bb264ef0f8ded7 23-Sep-2014 Elliott Hughes <enh@google.com> Fix a couple more cases of missing CLOEXEC.

The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.

Change-Id: Idba6a4f1d68587ec5b320d1e25f0b6a987ea32a0
c189ffaaec45efb49e785517e504b41a5e57b088 27-Aug-2014 Elliott Hughes <enh@google.com> More cases where libc should use O_CLOEXEC.

(cherry picked from commit f73183f1a34df22b62a3d0bbf82e18d5797c9cde)

(cherry picked from commit 21ce3f506f3b54e4f57a37847375cef9f8aff57f)

Change-Id: I70b240bd40ad8d2ba33ae7ab2618782709fd0d6a
21ce3f506f3b54e4f57a37847375cef9f8aff57f 27-Aug-2014 Elliott Hughes <enh@google.com> More cases where libc should use O_CLOEXEC.

Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
(cherry picked from commit f73183f1a34df22b62a3d0bbf82e18d5797c9cde)
f73183f1a34df22b62a3d0bbf82e18d5797c9cde 27-Aug-2014 Elliott Hughes <enh@google.com> More cases where libc should use O_CLOEXEC.

Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
1e8587a479fd8b1ce9b594298a93f517816e8f15 19-Aug-2014 Hans Boehm <hboehm@google.com> Work around atomic_load(const T*) issues.

Bug:17067219
Change-Id: I78e753bcf03464f5f05c3f37e394f2727d282589
30214b901e8dbec9ec11230187a8e71fc8a04014 01-Aug-2014 Hans Boehm <hboehm@google.com> 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
03eebcb6e8762e668a0d3af6bb303cccb88c5b81 13-Jun-2014 Christopher Ferris <cferris@google.com> Move common macros into bionic_macros.h.

Bug: 15590152
Change-Id: I730636613ef3653f68c5ab1d43b53beaf8e0dc25
d5ed63a6a8290de88802172ce178656fbafe70c6 22-May-2014 Elliott Hughes <enh@google.com> Hide most of the private futex functions.

Also hide part of the system properties compatibility code, since
we needed to touch that to keep it building.

I'll remove __futex_syscall4 and futex in a later patch.

Bug: 11156955
Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
3e786987b5fb3272b37dd955fe13fc67a8ddc880 15-May-2014 Elliott Hughes <enh@google.com> Remove the unused __system_property_wait.

This isn't declared in any header file.

Bug: 14970171
Change-Id: Ib9fce61343dfb6b6ccd7e1430e1a6e34e4e869df
8eac9af24ea7e570e0b297bcd6ac8a46ba3ecc39 10-May-2014 Elliott Hughes <enh@google.com> Bring in google3-style DISALLOW_* macros.

I've been meaning to do this for a very long time...

Change-Id: Ia8c16eee7c026c3c9505399948485fb778fb0152
879d33049946fa2293a61dbdb20addace953922b 13-Mar-2014 jiaguo <jiaguo@marvell.com> property: fix getting dirty serial value

__system_property_serial just returned serial value without
checking if it is dirty, so check and wait until serial
value is not dirty before return

Change-Id: If485b6251b5555b004912c66c7c2cb455a7fdbdc
Signed-off-by: jiaguo <jiaguo@marvell.com>
37e9570bce0ec5c08eab53935905f1e3a133dea2 24-Feb-2014 Narayan Kamath <narayan@google.com> Fix 64-bit build.

A warning about signed vs unsigned comparison was converted
into an error here :

...
struct stat st;
if (st.st_size > sizeof(prop_area) {
...

st_size is either an off64_t, which is a signed type. It's
worth investigating why this didn't trigger a warning on 32 bit,
where it's signed as well.

Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b
c9ae21a5c3b2e1baafe50f752e2e07e343d39530 19-Feb-2014 Narayan Kamath <narayan@google.com> Move system_properties over to C++.

This change constitutes the minimum amount of
work required to move the code over to C++, address
compiler warnings, and to make it const correct and
idiomatic (within the constraints of being called
from C code).

bug: 13058886

Change-Id: Ic78cf91b7c8e8f07b4ab0781333a9e243763298c