fix livelock problem in app context switching

the re-regsitration is a "send" not a "lend" now, because
the imef can't block during the context switch.

Not sure why I made it a lend in the first place, probably just
wasn't thinking...
This commit is contained in:
bunnie 2022-01-25 01:55:49 +08:00
parent 0f4743fc0b
commit 0557caf9be

View file

@ -290,7 +290,7 @@ impl ImeFrontEndApi for ImeFrontEnd {
}
fn connect_backend(&self, descriptor: ImefDescriptor) -> Result<(), xous::Error> {
let buf = Buffer::into_buf(descriptor).or(Err(xous::Error::InternalError))?;
buf.lend(self.cid, ImefOpcode::ConnectBackend.to_u32().unwrap())
buf.send(self.cid, ImefOpcode::ConnectBackend.to_u32().unwrap())
.or(Err(xous::Error::InternalError))
.map(|_| ())
}