Server IDs were being improperly indexed, resulting in a
probably-invalid server index being returned.
Adjust these so that correct server indices are returned.
Signed-off-by: Sean Cross <sean@xobs.io>
These packages modify RUSTFLAGS, which causes some packages to be
rebuilt every time. Move them out of the workspace so as to ensure they
don't use the same `target` directory.
Signed-off-by: Sean Cross <sean@xobs.io>
Cargo appears to cache packages in the workspace when multiple packages
use the same crate. Unfortunately, Xous uses different features
depending on whether it's running in the kernel or in userspace.
Pull the kernel version of "xous" in under a different namespace in
order to force it to use a different build.
Signed-off-by: Sean Cross <sean@xobs.io>
The kernel should run in a `no_std` environment, which means it must
currently run without `alloc`. We have our own allocation methods when
running on baremetal hardware.
Begin the work to break out the allocation method so that it will work
on both desktop and baremetal environments.
Signed-off-by: Sean Cross <sean@xobs.io>
The kernel and userspace both need to use `xous`, but have different
requirements. If we use a workspace, then all instances of `xous-rs`
must have the same feature set.
This breaks them apart so the kernel can have one set of features and
programs can have another set.
As part of this change, tests are now integrated into the kernel, and a
new `create_process_as_thread()` and `wait_process_as_thread()` function
pair have been added.
Signed-off-by: Sean Cross <sean@xobs.io>
This package serves only to build tests for the kernel, because the
kernel wants to use a different mechanism for spawning processes.
Cargo doesn't support having `#[cfg(test)]` attributes on modules in
order to allow conditional compilation depending on whether we're
running a test or not. To work around this, `main.rs` is included in
another dummy crate.
Signed-off-by: Sean Cross <sean@xobs.io>
Due to an ordering issue, it was possible for thread message responses
to become deadlocked, wherein a message would get stored in the shared
table in between checking the table value and locking the network
connection.
This change makes a second check of the table after the network
connection is locked, in order to prevent this condition.
Signed-off-by: Sean Cross <sean@xobs.io>
This now uses a system of access keys to associate processes with the
kernel.
This currently does not pass tests.
Signed-off-by: Sean Cross <sean@xobs.io>
Connections weren't getting multiplexed correctly. As a result, they
would respond with the wrong message to a given thread.
Signed-off-by: Sean Cross <sean@xobs.io>