mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: add memory from Results to network packets
If a Result contains attached memory, add that memory on to the network packet that gets sent by the kernel. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
702676031e
commit
74b3fde198
1 changed files with 4 additions and 0 deletions
|
|
@ -570,6 +570,10 @@ pub fn idle() -> bool {
|
|||
for word in response.to_args().iter_mut() {
|
||||
response_vec.extend_from_slice(&word.to_le_bytes());
|
||||
}
|
||||
if let Some(mem) = response.memory() {
|
||||
let s = unsafe { core::slice::from_raw_parts(mem.as_ptr(), mem.len()) };
|
||||
response_vec.extend_from_slice(s);
|
||||
}
|
||||
process.send(&response_vec).unwrap_or_else(|_e| {
|
||||
// If we're unable to send data to the process, assume it's dead and terminate it.
|
||||
eprintln!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue