Skip to content

Commit

Permalink
remove the dead-wait before the PDDB is mounted
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bunnie committed Nov 5, 2022
1 parent a56b8c8 commit 817e758
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/shellchat/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 817e758

Please sign in to comment.