When a page is shared, only report an address as being available when
we receive a `BadAddress` error when doing the translation. Otherwise,
assume it is in use.
Signed-off-by: Sean Cross <sean@xobs.io>
When memory has been shared, it is no longer valid. However, it is still
"in use".
Return a `ShareViolation` error in this case so we can check for it
elsewhere.
Signed-off-by: Sean Cross <sean@xobs.io>
Initially, we wanted to be able to immutably lend data in a one-to-many
fashion. However, this has proven challenging, and doesn't have any
immediately obvious useful benefits.
For now, only allow one-to-one immutable lends.
Signed-off-by: Sean Cross <sean@xobs.io>
Instead of hardcoding bit values, use the symbolic names. This will
ensure we don't make mistakes by using magic numbers.
Signed-off-by: Sean Cross <sean@xobs.io>
In an effort to homogonize platforms, we are moving away from `usize` in
favour of `u32`. Allow the `CID` type to be a `u32` in the kernel by
casting it to a `usize` as necessary.
Signed-off-by: Sean Cross <sean@xobs.io>
When allocating a page, it is only assigned a physical address once it
is actually needed. This on-demand paging works well, however we were
assuming that the first address of a page was accessed first.
This fixes an issue where a Message is allocated but the first byte
isn't accessed first.
Signed-off-by: Sean Cross <sean@xobs.io>
When allocating a page, it is only assigned a physical address once it
is actually needed. This on-demand paging works well, however we were
assuming that the first address of a page was accessed first.
This fixes an issue where a Message is allocated but the first byte
isn't accessed first.
Signed-off-by: Sean Cross <sean@xobs.io>
This tracks a variable that has been renamed, and was preventing the
kernel from compiling when debug printing is enabled.
This fixes#19.
Signed-off-by: Sean Cross <sean@xobs.io>
When compiling under non-test scenarios, the `rand` create conflicts
with the new `rand` module.
Disambiguate this field.
Signed-off-by: Sean Cross <sean@xobs.io>
Servers will, by default, get randomly-assigned SIDs. Certain servers
will want to have well-known SIDs, such as the log server or the
nameserver. These will use a separate call in order to perform this
priveledged operation.
A subsequent patch will add `CreateServer`.
Signed-off-by: Sean Cross <sean@xobs.io>