From 04a3493550e5c3cd4754d2f799776eb7479e361f Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 30 Oct 2020 10:15:32 +0800 Subject: [PATCH] kernel: hosted: print status adding memory to return val When returning memory to a thread, attach memory if present. Signed-off-by: Sean Cross --- kernel/src/arch/hosted/process.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/src/arch/hosted/process.rs b/kernel/src/arch/hosted/process.rs index 33a239234..bf35cea02 100644 --- a/kernel/src/arch/hosted/process.rs +++ b/kernel/src/arch/hosted/process.rs @@ -290,6 +290,7 @@ impl Process { if let Some(mem) = result.memory() { let s = unsafe { core::slice::from_raw_parts(mem.as_ptr(), mem.len()) }; + print!(" [adding {} additional bytes from result]", s.len()); response.extend_from_slice(&s); } @@ -304,6 +305,7 @@ impl Process { // "memory was waiting to be returned, but message was not a result message" // ); // } + print!(" [adding {} additional bytes from memory being returned]", buf.len()); response.extend_from_slice(&buf); } @@ -312,6 +314,7 @@ impl Process { // current_pid_idx + 1, // response // ); + print!(" [setting thread return value to {} bytes]", response.len()); process .conn .as_mut()