Add more accessors to mammoth classes

This commit is contained in:
Drew Galbraith 2023-06-16 01:29:49 -07:00
parent 71e51730b7
commit 6e20e5a610
4 changed files with 7 additions and 1 deletions

View file

@ -8,6 +8,7 @@ class Channel {
Channel() {}
void adopt_cap(uint64_t id);
uint64_t release_cap();
uint64_t cap();
z_err_t WriteStr(const char* msg);
z_err_t ReadStr(char* buffer, uint64_t* size);

View file

@ -15,6 +15,9 @@ class MappedMemoryRegion {
uint64_t paddr() { return paddr_; }
uint64_t vaddr() { return vaddr_; }
uint64_t size() { return size_; }
uint64_t cap() { return vmmo_cap_; }
operator bool() { return vmmo_cap_ != 0; }