Skip to content

Commit 817e758

Browse files
committed
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.
1 parent a56b8c8 commit 817e758

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

services/shellchat/src/main.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,11 @@ fn wrapped_main() -> ! {
426426
let main_conn = xous::connect(shch_sid).unwrap();
427427
move || {
428428
let tt = ticktimer_server::Ticktimer::new().unwrap();
429-
tt.sleep_ms(500).ok(); // give some time for the system to finish booting
429+
let xns = xous_names::XousNames::new().unwrap();
430+
let gam = gam::Gam::new(&xns).unwrap();
431+
while !gam.trusted_init_done().unwrap() {
432+
tt.sleep_ms(50).ok();
433+
}
430434
loop {
431435
let (no_retry_failure, count) = pddb::Pddb::new().try_mount();
432436
pddb_init_done.store(true, Ordering::SeqCst);

0 commit comments

Comments
 (0)