xous-core/xous-rs/src
bunnie 0e936eaee3 add a macro to help reduce the burden of unpacking messages
The syntax to pattern-match a message is a pretty heavy cognitive
burden. Try to ease that by introducing a macro.

The main coin-toss here is whether to include the "what you do
with the message" expression within the macro, or to allow it to
be a block that trails it.

The main benefit of including the body inside the macro is that
we can append an "else" clause that spits out an error message
in case the template didn't match. The drawback is the awkwardness
of putting curly braces inside the parens of the macro expansion.

I think Rust coders are probably more OK with that awkwardness,
even though I find it visually unappealing; and the benefit is that
scalars sent to opcodes expecting blockingscalars (and vice versa)
don't go to a "black hole" -- you'll get an error message.

This error message will probably save someone an hour of debugging
someday, so we'll go with the awkwardness.
2021-04-02 15:34:39 +08:00
..
arch xous: fix create_thread_[2..4] arg count 2021-03-25 10:53:50 +08:00
messages repo: run cargo fmt 2021-01-03 18:31:51 +08:00
asm.S initial commit 2020-03-10 12:13:05 +08:00
buffer.rs xous: initial draft of xous target support 2021-03-11 12:27:55 +08:00
carton.rs xous: initial draft of xous target support 2021-03-11 12:27:55 +08:00
definitions.rs add a macro to help reduce the burden of unpacking messages 2021-04-02 15:34:39 +08:00
lib.rs ipc: convert project to use xous-ipc 2021-03-26 20:22:33 +08:00
names.rs refactor of COM 2021-04-02 05:43:47 +08:00
process.rs xous: return TID and PID from current_tid() and current_pid() 2021-03-18 20:10:01 +08:00
string.rs ipc: convert project to use xous-ipc 2021-03-26 20:22:33 +08:00
syscall.rs xous: add offset and valid to returned memory 2021-03-25 13:16:15 +08:00