summaryrefslogtreecommitdiffstats
path: root/libc/netbsd
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-01-23 23:07:06 -0800
committerColin Cross <ccross@android.com>2013-06-17 12:44:34 -0700
commitdc1038b7900acb664e99643d2974e1a0f4703781 (patch)
tree6b1606253ce3f097d6a91b063a00740a0df28a3d /libc/netbsd
parenta658ed09e52b2f8b5f21e02e8ea6662ffdf544e6 (diff)
downloadbionic-dc1038b7900acb664e99643d2974e1a0f4703781.zip
bionic-dc1038b7900acb664e99643d2974e1a0f4703781.tar.gz
bionic-dc1038b7900acb664e99643d2974e1a0f4703781.tar.bz2
bionic: move system property writing from init to bionic
Move the implementation of writing to the system property area from init to bionic, next to the reader implementation. This will allow full property testing to be added to bionic tests. Add new accessor and waiting functions to hide the implementation from watchprops and various bionic users. Also hide some of the implementation details of the property area from init by moving them into _system_properties.h, and other details from everybody by moving them into system_properties.h. Change-Id: I9026e604109e30546b2849b60cab2e7e5ff00ba5
Diffstat (limited to 'libc/netbsd')
-rw-r--r--libc/netbsd/resolv/res_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/netbsd/resolv/res_state.c b/libc/netbsd/resolv/res_state.c
index 32ffdca..de82e1a 100644
--- a/libc/netbsd/resolv/res_state.c
+++ b/libc/netbsd/resolv/res_state.c
@@ -71,7 +71,7 @@ _res_thread_alloc(void)
rt->_serial = 0;
rt->_pi = (struct prop_info*) __system_property_find("net.change");
if (rt->_pi) {
- rt->_serial = rt->_pi->serial;
+ rt->_serial = __system_property_serial(rt->_pi);
}
memset(rt->_rstatic, 0, sizeof rt->_rstatic);
}
@@ -135,14 +135,14 @@ _res_thread_get(void)
return rt;
}
}
- if (rt->_serial == rt->_pi->serial) {
+ if (rt->_serial == __system_property_serial(rt->_pi)) {
/* Nothing changed, so return the current state */
D("%s: tid=%d rt=%p nothing changed, returning",
__FUNCTION__, gettid(), rt);
return rt;
}
/* Update the recorded serial number, and go reset the state */
- rt->_serial = rt->_pi->serial;
+ rt->_serial = __system_property_serial(rt->_pi);
goto RESET_STATE;
}