These didn't correctly set the thread status in the server when
returning a value. Instead of marking a server as runnable, it remained
in an idle state.
This correctly sets the thread status in the server, and resumes the
client.
This has been tested in Renode as well as using `cargo test`.
Signed-off-by: Sean Cross <sean@xobs.io>
This function is used to decrement the program counter to re-run a given
instruction. This can be used as a cheap way to implement blocking
calls.
Signed-off-by: Sean Cross <sean@xobs.io>
this cleans up some namespace issues when including
the utra crate which also refers to utra::generated::utra,
and there are CONST at the crate-level, and also functions
at the module-level which need disambiguation. By naming
the crate utra-lib this saves a bit of syntatic wrangling
at the top of every file.
This adds svd2utra, which enables building for non-embedded harware.
It also fixes some build issues, and paves the way for generating UTRA
at compile-time.
Signed-off-by: Sean Cross <sean@xobs.io>
The `sender` was, previously, somewhat mislabeled. It was a combination
of PID and TID, except when it wasn't.
Instead, make this value a combination of ConnectionID and queue index.
This makes it easier to reason about which connection we're responding
to.
Additionally, don't expose teh global Server Index Table to userspace
programs.
Signed-off-by: Sean Cross <sean@xobs.io>
This fixes issue #1, which correctly noted the comment was correct but
the code implementation was not correct.
Signed-off-by: Sean Cross <sean@xobs.io>
Previously, each process could return one chunk of memory. With this
change, processes can now return one chunk of memory per thread. This
enables multiple threads to lend memory to a server.
Signed-off-by: Sean <xobs@ci.betrusted.io>
With the introduction of TrySendMessage, the kernel needs to know that
this data structure should be transmitted over the wire in the same
manner as SendMessage. Previously it was not special-casing this, which
resulted in memory errors.
Signed-off-by: Sean <xobs@ci.betrusted.io>
When the message coming in from the client to a server changes, print
an informative message rather than just "left != right".
Signed-off-by: Sean <xobs@ci.betrusted.io>
When running on Linux, attempting to shut down a network socket that
has already been closed results in an error. That is, if the client
disconnects, then the server will throw an error when it also attempts
to disconnect.
Ignore errors to `.shutdown()` to fix `cargo test` on Linux.
Signed-off-by: Sean Cross <sean@xobs.io>