mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
xous: definitions: Message: add has_memory()
This function can be used to determine if a function has any memory attached to the message. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6c941855be
commit
81a927e31f
1 changed files with 8 additions and 0 deletions
|
|
@ -297,6 +297,14 @@ impl Message {
|
||||||
Message::Move(_) | Message::Scalar(_) => false,
|
Message::Move(_) | Message::Scalar(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Determine whether the specified message has data attached
|
||||||
|
pub fn has_memory(&self) -> bool {
|
||||||
|
match *self {
|
||||||
|
Message::MutableBorrow(_) | Message::Borrow(_) | Message::Move(_) => true,
|
||||||
|
Message::BlockingScalar(_) | Message::Scalar(_) => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue