mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
put keystore in charge of enabling preemption
this is done after critical setup is done. it doesn't guarantee that it has an infinite time slice, but it makes the startup sequence more deterministic.
This commit is contained in:
parent
21c9089de2
commit
2a2863c11a
1 changed files with 4 additions and 0 deletions
|
|
@ -12,8 +12,12 @@ use xous_ipc::Buffer;
|
|||
const WELL_KNOWN_KEY: &'static str = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
|
||||
pub fn keystore(sid: SID) -> ! {
|
||||
let hal = bao1x_hal_service::Hal::new();
|
||||
|
||||
let mut msg_opt = None;
|
||||
|
||||
// allow preemption once the keystore has claimed locks on all its critical resources
|
||||
hal.set_preemption(true);
|
||||
loop {
|
||||
xous::reply_and_receive_next(sid, &mut msg_opt).unwrap();
|
||||
let msg = msg_opt.as_mut().unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue