mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: fix mutableborrow message returning
We weren't properly updating the packet when a mutableborrow was getting returned. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
be1687ffdd
commit
8a3f6a2b43
2 changed files with 5 additions and 2 deletions
|
|
@ -1174,6 +1174,7 @@ impl SystemServices {
|
|||
_dest_tid: TID,
|
||||
dest_virt: *mut u8,
|
||||
len: usize,
|
||||
_buf: MemoryRange,
|
||||
) -> Result<*mut u8, xous_kernel::Error> {
|
||||
if len == 0 {
|
||||
return Err(xous_kernel::Error::BadAddress);
|
||||
|
|
@ -1223,9 +1224,10 @@ impl SystemServices {
|
|||
dest_pid: PID,
|
||||
dest_tid: TID,
|
||||
_dest_virt: *mut u8,
|
||||
len: usize,
|
||||
_len: usize,
|
||||
buf: MemoryRange,
|
||||
) -> Result<*mut u8, xous_kernel::Error> {
|
||||
let buf = unsafe { core::slice::from_raw_parts(src_virt, len) };
|
||||
let buf = unsafe { core::slice::from_raw_parts(buf.as_ptr(), buf.len()) };
|
||||
let current_pid = self.current_pid();
|
||||
{
|
||||
let target_process = self.get_process(dest_pid)?;
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ fn return_memory(
|
|||
client_tid,
|
||||
client_addr.get() as _,
|
||||
len.get(),
|
||||
buf,
|
||||
)?;
|
||||
|
||||
// Unblock the client context to allow it to continue.
|
||||
|
|
|
|||
Loading…
Reference in a new issue