Add __system_property_wait and return the serial in __system_property_read_callback.
In order to implement android::base::WaitForProperty well, we need a way to
wait not for *any* property to change (__system_property_wait_any), but to
specifically wait for the property represented by a given `prop_info` to
change.
The android::base::WaitForProperty implementation, like attempts to cache
system properties in the past, also needs a way to keep serials and values
in sync, but the existing functions don't provide a cheap way to get a
consistent snapshot. Change the __system_property_read_callback callback's
type to include the serial corresponding to the given value.
Add a test, slightly clean up some of the existing tests (and name them to
include the names of the functions they're testing, in our usual style).
Bug: http://b/35201172
Test: ran tests
Change-Id: Ibc8ebe2e88eef1e333a1bd3dd7f68135f1ba7fb5
diff --git a/libc/libc.arm.map b/libc/libc.arm.map
index 4319429..33aedb2 100644
--- a/libc/libc.arm.map
+++ b/libc/libc.arm.map
@@ -1266,6 +1266,7 @@
LIBC_O {
global:
__system_property_read_callback; # future
+ __system_property_wait; # future
bsd_signal; # arm x86 mips versioned=26
catclose; # future
catgets; # future