summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2018-05-24 20:00:39 -0500
committerElliott Hughes2018-05-24 20:04:31 -0500
commitdc803126283444431c0d06f0386eddada0fe6b77 (patch)
tree1ea923034a483bc3b935d7a6a1eeb85712eea244 /base/include
parent54be246a1f916a9be409b59ceaebf7a564170d2c (diff)
downloadplatform-system-core-dc803126283444431c0d06f0386eddada0fe6b77.tar.gz
platform-system-core-dc803126283444431c0d06f0386eddada0fe6b77.tar.xz
platform-system-core-dc803126283444431c0d06f0386eddada0fe6b77.zip
libbase: add host properties support.
Move init and libprocessgroup away from their existing hacks. Bug: N/A Test: ran tests Change-Id: Ifabdd38e0cc4ab2582f1ea59d32159d386f48eb6
Diffstat (limited to 'base/include')
-rw-r--r--base/include/android-base/properties.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/include/android-base/properties.h b/base/include/android-base/properties.h
index 041586c2c..3a051435c 100644
--- a/base/include/android-base/properties.h
+++ b/base/include/android-base/properties.h
@@ -19,10 +19,6 @@
19 19
20#include <sys/cdefs.h> 20#include <sys/cdefs.h>
21 21
22#if !defined(__BIONIC__)
23#error Only bionic supports system properties.
24#endif
25
26#include <chrono> 22#include <chrono>
27#include <limits> 23#include <limits>
28#include <string> 24#include <string>
@@ -62,14 +58,18 @@ bool SetProperty(const std::string& key, const std::string& value);
62// Waits for the system property `key` to have the value `expected_value`. 58// Waits for the system property `key` to have the value `expected_value`.
63// Times out after `relative_timeout`. 59// Times out after `relative_timeout`.
64// Returns true on success, false on timeout. 60// Returns true on success, false on timeout.
61#if defined(__BIONIC__)
65bool WaitForProperty(const std::string& key, const std::string& expected_value, 62bool WaitForProperty(const std::string& key, const std::string& expected_value,
66 std::chrono::milliseconds relative_timeout = std::chrono::milliseconds::max()); 63 std::chrono::milliseconds relative_timeout = std::chrono::milliseconds::max());
64#endif
67 65
68// Waits for the system property `key` to be created. 66// Waits for the system property `key` to be created.
69// Times out after `relative_timeout`. 67// Times out after `relative_timeout`.
70// Returns true on success, false on timeout. 68// Returns true on success, false on timeout.
69#if defined(__BIONIC__)
71bool WaitForPropertyCreation(const std::string& key, std::chrono::milliseconds relative_timeout = 70bool WaitForPropertyCreation(const std::string& key, std::chrono::milliseconds relative_timeout =
72 std::chrono::milliseconds::max()); 71 std::chrono::milliseconds::max());
72#endif
73 73
74} // namespace base 74} // namespace base
75} // namespace android 75} // namespace android