Add resetprop -w for waiting property change

It's very easy to wait for property change both in Java and C++,
but it's not the case in shell script. With this patch, developers
can now easily to wait for property change, just like what we have
in `.rc` files, and to wait for boot complete.
This commit is contained in:
LoveSy
2023-12-22 01:49:25 +08:00
committed by John Wu
parent 27ece3c7df
commit e94d65b4b2
5 changed files with 45 additions and 18 deletions
+6 -1
View File
@@ -49,7 +49,12 @@ pub mod ffi {
#[cxx_name = "prop_cb"]
type PropCb;
unsafe fn get_prop_rs(name: *const c_char, persist: bool) -> String;
unsafe fn prop_cb_exec(cb: Pin<&mut PropCb>, name: *const c_char, value: *const c_char);
unsafe fn prop_cb_exec(
cb: Pin<&mut PropCb>,
name: *const c_char,
value: *const c_char,
serial: u32,
);
}
unsafe extern "C++" {