remove the dead-wait before the PDDB is mounted

the "right" way to do this is to poll to see if trusted init is
done. once that is done, you can go ahead and try to mount the
PDDB.
This commit is contained in:
bunnie 2022-11-06 03:36:43 +08:00
parent a56b8c802f
commit 817e758f7c

View file

@ -426,7 +426,11 @@ fn wrapped_main() -> ! {
let main_conn = xous::connect(shch_sid).unwrap();
move || {
let tt = ticktimer_server::Ticktimer::new().unwrap();
tt.sleep_ms(500).ok(); // give some time for the system to finish booting
let xns = xous_names::XousNames::new().unwrap();
let gam = gam::Gam::new(&xns).unwrap();
while !gam.trusted_init_done().unwrap() {
tt.sleep_ms(50).ok();
}
loop {
let (no_retry_failure, count) = pddb::Pddb::new().try_mount();
pddb_init_done.store(true, Ordering::SeqCst);