mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
xous: run cargo-fmt
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
071f2047f8
commit
27c35223cd
1 changed files with 19 additions and 28 deletions
|
|
@ -461,8 +461,9 @@ impl SysCall {
|
||||||
0,
|
0,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
SysCall::CreateServerId =>
|
SysCall::CreateServerId => {
|
||||||
[SysCallNumber::CreateServerId as usize, 0, 0, 0, 0, 0, 0, 0],
|
[SysCallNumber::CreateServerId as usize, 0, 0, 0, 0, 0, 0, 0]
|
||||||
|
}
|
||||||
SysCall::ReturnToParent(a1, a2) => [
|
SysCall::ReturnToParent(a1, a2) => [
|
||||||
SysCallNumber::ReturnToParent as usize,
|
SysCallNumber::ReturnToParent as usize,
|
||||||
a1.get() as usize,
|
a1.get() as usize,
|
||||||
|
|
@ -678,24 +679,8 @@ impl SysCall {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
],
|
],
|
||||||
SysCall::GetThreadId => [SysCallNumber::GetThreadId as usize,
|
SysCall::GetThreadId => [SysCallNumber::GetThreadId as usize, 0, 0, 0, 0, 0, 0, 0],
|
||||||
0,
|
SysCall::GetProcessId => [SysCallNumber::GetProcessId as usize, 0, 0, 0, 0, 0, 0, 0],
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
],
|
|
||||||
SysCall::GetProcessId => [SysCallNumber::GetProcessId as usize,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
],
|
|
||||||
SysCall::Invalid(a1, a2, a3, a4, a5, a6, a7) => [
|
SysCall::Invalid(a1, a2, a3, a4, a5, a6, a7) => [
|
||||||
SysCallNumber::Invalid as usize,
|
SysCallNumber::Invalid as usize,
|
||||||
*a1,
|
*a1,
|
||||||
|
|
@ -905,7 +890,10 @@ impl SysCall {
|
||||||
pub fn has_memory(&self) -> bool {
|
pub fn has_memory(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
SysCall::TrySendMessage(_, msg) | SysCall::SendMessage(_, msg) => {
|
SysCall::TrySendMessage(_, msg) | SysCall::SendMessage(_, msg) => {
|
||||||
matches!(msg, Message::Move(_) | Message::Borrow(_) | Message::MutableBorrow(_))
|
matches!(
|
||||||
|
msg,
|
||||||
|
Message::Move(_) | Message::Borrow(_) | Message::MutableBorrow(_)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
SysCall::ReturnMemory(_, _) => true,
|
SysCall::ReturnMemory(_, _) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
|
|
@ -963,13 +951,16 @@ impl SysCall {
|
||||||
|
|
||||||
/// Returns `true` if the given syscall may be called from an IRQ context
|
/// Returns `true` if the given syscall may be called from an IRQ context
|
||||||
pub fn can_call_from_interrupt(&self) -> bool {
|
pub fn can_call_from_interrupt(&self) -> bool {
|
||||||
matches!(self, SysCall::TrySendMessage(_, _)
|
matches!(
|
||||||
| SysCall::TryConnect(_)
|
self,
|
||||||
| SysCall::TryReceiveMessage(_)
|
SysCall::TrySendMessage(_, _)
|
||||||
| SysCall::ReturnToParent(_, _)
|
| SysCall::TryConnect(_)
|
||||||
| SysCall::ReturnScalar2(_, _, _)
|
| SysCall::TryReceiveMessage(_)
|
||||||
| SysCall::ReturnScalar1(_, _)
|
| SysCall::ReturnToParent(_, _)
|
||||||
| SysCall::ReturnMemory(_, _))
|
| SysCall::ReturnScalar2(_, _, _)
|
||||||
|
| SysCall::ReturnScalar1(_, _)
|
||||||
|
| SysCall::ReturnMemory(_, _)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue