Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/console/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ impl<S: Syscalls, C: Config> Console<S, C> {
/// This is an alternative to `fmt::Write::write`
/// because this can actually return an error code.
pub fn write(s: &[u8]) -> Result<(), ErrorCode> {
// for an empty string the driver would never schedule an upcall, so the app would yield infinitely
if s.is_empty() {
return Ok(());
}
let called: Cell<Option<(u32,)>> = Cell::new(None);
share::scope::<
(
Expand Down