diff --git a/lib/mammoth/file/file.cpp b/lib/mammoth/file/file.cpp index 0dfa605..5de5cfa 100644 --- a/lib/mammoth/file/file.cpp +++ b/lib/mammoth/file/file.cpp @@ -11,6 +11,10 @@ namespace mmth { namespace { +using yellowstone::Endpoint; +using yellowstone::GetEndpointRequest; +using yellowstone::YellowstoneClient; + VFSClient* gVfsClient = nullptr; void GetVfsClientIfNeeded() { diff --git a/lib/mammoth/input/keyboard.cpp b/lib/mammoth/input/keyboard.cpp index 19d0100..4ddc336 100644 --- a/lib/mammoth/input/keyboard.cpp +++ b/lib/mammoth/input/keyboard.cpp @@ -9,6 +9,10 @@ namespace mmth { namespace { +using yellowstone::Endpoint; +using yellowstone::GetEndpointRequest; +using yellowstone::YellowstoneClient; + void KeyboardListenerEntry(void* keyboard_base) { reinterpret_cast(keyboard_base)->ListenLoop(); } diff --git a/sys/denali/denali.cpp b/sys/denali/denali.cpp index 9cf23f9..d25a0bc 100644 --- a/sys/denali/denali.cpp +++ b/sys/denali/denali.cpp @@ -7,6 +7,10 @@ #include "ahci/ahci_driver.h" #include "denali_server.h" +using yellowstone::AhciInfo; +using yellowstone::RegisterEndpointRequest; +using yellowstone::YellowstoneClient; + uint64_t main(uint64_t init_port_cap) { check(ParseInitPort(init_port_cap)); diff --git a/sys/denali/lib/denali/denali.yunq.client.cpp b/sys/denali/lib/denali/denali.yunq.client.cpp index 2020331..60764dc 100644 --- a/sys/denali/lib/denali/denali.yunq.client.cpp +++ b/sys/denali/lib/denali/denali.yunq.client.cpp @@ -8,6 +8,7 @@ + DenaliClient::~DenaliClient() { if (endpoint_ != 0) { check(ZCapRelease(endpoint_)); @@ -93,3 +94,5 @@ glcr::ErrorCode DenaliClient::ReadMany(const ReadManyRequest& request, ReadRespo } + + diff --git a/sys/denali/lib/denali/denali.yunq.client.h b/sys/denali/lib/denali/denali.yunq.client.h index ee80aca..a2e8044 100644 --- a/sys/denali/lib/denali/denali.yunq.client.h +++ b/sys/denali/lib/denali/denali.yunq.client.h @@ -8,6 +8,7 @@ #include "denali.yunq.h" + class DenaliClient { public: DenaliClient(z_cap_t Denali_cap) : endpoint_(Denali_cap) {} @@ -33,3 +34,4 @@ class DenaliClient { uint64_t kCapBufferSize = 0x10; glcr::CapBuffer cap_buffer_{kCapBufferSize}; }; + diff --git a/sys/denali/lib/denali/denali.yunq.cpp b/sys/denali/lib/denali/denali.yunq.cpp index 50a12d9..e039d9e 100644 --- a/sys/denali/lib/denali/denali.yunq.cpp +++ b/sys/denali/lib/denali/denali.yunq.cpp @@ -1,6 +1,7 @@ // Generated file -- DO NOT MODIFY. #include "denali.yunq.h" + namespace { const uint64_t header_size = 24; // 4x uint32, 1x uint64 @@ -248,4 +249,5 @@ uint64_t ReadResponse::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t offset WriteHeader(bytes, offset, core_size, next_extension); return next_extension; -} \ No newline at end of file +} + diff --git a/sys/denali/lib/denali/denali.yunq.h b/sys/denali/lib/denali/denali.yunq.h index 1727f4d..57e3601 100644 --- a/sys/denali/lib/denali/denali.yunq.h +++ b/sys/denali/lib/denali/denali.yunq.h @@ -6,6 +6,8 @@ #include #include #include + + class ReadRequest { public: ReadRequest() {} @@ -83,4 +85,5 @@ class ReadResponse { // Parses everything except for caps. void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset); -}; \ No newline at end of file +}; + diff --git a/sys/denali/lib/denali/denali.yunq.server.cpp b/sys/denali/lib/denali/denali.yunq.server.cpp index 9b1d83f..6d596ad 100644 --- a/sys/denali/lib/denali/denali.yunq.server.cpp +++ b/sys/denali/lib/denali/denali.yunq.server.cpp @@ -4,6 +4,7 @@ #include #include + namespace { const uint32_t kSentinel = 0xBEEFDEAD; @@ -144,3 +145,5 @@ glcr::ErrorCode DenaliServerBase::HandleRequest(const glcr::ByteBuffer& request, } return glcr::OK; } + + diff --git a/sys/denali/lib/denali/denali.yunq.server.h b/sys/denali/lib/denali/denali.yunq.server.h index 41083ed..241ec99 100644 --- a/sys/denali/lib/denali/denali.yunq.server.h +++ b/sys/denali/lib/denali/denali.yunq.server.h @@ -10,6 +10,8 @@ + + class DenaliServerBase { public: DenaliServerBase(z_cap_t Denali_cap) : endpoint_(Denali_cap) {} @@ -43,3 +45,5 @@ class DenaliServerBase { glcr::CapBuffer& resp_caps); }; + + diff --git a/sys/teton/framebuffer/framebuffer.cpp b/sys/teton/framebuffer/framebuffer.cpp index 1c80441..5960c84 100644 --- a/sys/teton/framebuffer/framebuffer.cpp +++ b/sys/teton/framebuffer/framebuffer.cpp @@ -1,6 +1,6 @@ #include "framebuffer/framebuffer.h" -Framebuffer::Framebuffer(const FramebufferInfo& info) +Framebuffer::Framebuffer(const yellowstone::FramebufferInfo& info) : fb_info_(info), cursor_pos_(0) { uint64_t buff_size_bytes = fb_info_.height() * fb_info_.pitch(); fb_memory_ = mmth::OwnedMemoryRegion::DirectPhysical(fb_info_.address_phys(), diff --git a/sys/teton/framebuffer/framebuffer.h b/sys/teton/framebuffer/framebuffer.h index 8c8253c..d6db590 100644 --- a/sys/teton/framebuffer/framebuffer.h +++ b/sys/teton/framebuffer/framebuffer.h @@ -5,7 +5,7 @@ class Framebuffer { public: - Framebuffer(const FramebufferInfo& info); + Framebuffer(const yellowstone::FramebufferInfo& info); void DrawPixel(uint32_t row, uint32_t col, uint32_t pixel); @@ -17,7 +17,7 @@ class Framebuffer { private: // FIXME: Implement Yunq copy or move so we // don't have to store a reference here. - const FramebufferInfo& fb_info_; + const yellowstone::FramebufferInfo& fb_info_; mmth::OwnedMemoryRegion fb_memory_; uint32_t* fb_; diff --git a/sys/teton/teton.cpp b/sys/teton/teton.cpp index f807806..e8d234e 100644 --- a/sys/teton/teton.cpp +++ b/sys/teton/teton.cpp @@ -9,6 +9,9 @@ #include "framebuffer/psf.h" #include "terminal.h" +using yellowstone::FramebufferInfo; +using yellowstone::YellowstoneClient; + uint64_t main(uint64_t init_port) { ParseInitPort(init_port); diff --git a/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp b/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp index 42d417f..a4a00ec 100644 --- a/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp +++ b/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp @@ -3,7 +3,7 @@ #include glcr::ErrorOr> Ext2BlockReader::Init( - const DenaliInfo& denali_info) { + const yellowstone::DenaliInfo& denali_info) { // Read 1024 bytes from 1024 offset. // FIXME: Don't assume 512 byte sectors somehow. DenaliClient client(denali_info.denali_endpoint()); diff --git a/sys/victoriafalls/fs/ext2/ext2_block_reader.h b/sys/victoriafalls/fs/ext2/ext2_block_reader.h index c7e0959..aa49fba 100644 --- a/sys/victoriafalls/fs/ext2/ext2_block_reader.h +++ b/sys/victoriafalls/fs/ext2/ext2_block_reader.h @@ -16,7 +16,7 @@ class Ext2BlockReader { public: static glcr::ErrorOr> Init( - const DenaliInfo& denali_info); + const yellowstone::DenaliInfo& denali_info); // TODO: Consider creating a new class wrapper with these computations. Superblock* GetSuperblock(); diff --git a/sys/victoriafalls/fs/ext2/ext2_driver.cpp b/sys/victoriafalls/fs/ext2/ext2_driver.cpp index afab0c3..2202163 100644 --- a/sys/victoriafalls/fs/ext2/ext2_driver.cpp +++ b/sys/victoriafalls/fs/ext2/ext2_driver.cpp @@ -3,7 +3,8 @@ #include #include -glcr::ErrorOr Ext2Driver::Init(const DenaliInfo& denali_info) { +glcr::ErrorOr Ext2Driver::Init( + const yellowstone::DenaliInfo& denali_info) { ASSIGN_OR_RETURN(glcr::SharedPtr reader, Ext2BlockReader::Init(glcr::Move(denali_info))); diff --git a/sys/victoriafalls/fs/ext2/ext2_driver.h b/sys/victoriafalls/fs/ext2/ext2_driver.h index b8546bc..b1b4100 100644 --- a/sys/victoriafalls/fs/ext2/ext2_driver.h +++ b/sys/victoriafalls/fs/ext2/ext2_driver.h @@ -10,7 +10,8 @@ class Ext2Driver { public: - static glcr::ErrorOr Init(const DenaliInfo& denali_info); + static glcr::ErrorOr Init( + const yellowstone::DenaliInfo& denali_info); glcr::ErrorCode ProbePartition(); diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.cpp b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.cpp index cbd3c3a..cf03ab0 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.cpp +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.cpp @@ -8,6 +8,7 @@ + VFSClient::~VFSClient() { if (endpoint_ != 0) { check(ZCapRelease(endpoint_)); @@ -93,3 +94,5 @@ glcr::ErrorCode VFSClient::GetDirectory(const GetDirectoryRequest& request, Dire } + + diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.h b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.h index ba62714..0a02404 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.h +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.client.h @@ -8,6 +8,7 @@ #include "victoriafalls.yunq.h" + class VFSClient { public: VFSClient(z_cap_t VFS_cap) : endpoint_(VFS_cap) {} @@ -33,3 +34,4 @@ class VFSClient { uint64_t kCapBufferSize = 0x10; glcr::CapBuffer cap_buffer_{kCapBufferSize}; }; + diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.cpp b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.cpp index 155616f..ca1dbd7 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.cpp +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.cpp @@ -1,6 +1,7 @@ // Generated file -- DO NOT MODIFY. #include "victoriafalls.yunq.h" + namespace { const uint64_t header_size = 24; // 4x uint32, 1x uint64 @@ -283,4 +284,5 @@ uint64_t Directory::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t offset, g WriteHeader(bytes, offset, core_size, next_extension); return next_extension; -} \ No newline at end of file +} + diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.h b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.h index 01a7537..f4d9b8d 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.h +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.h @@ -6,6 +6,8 @@ #include #include #include + + class OpenFileRequest { public: OpenFileRequest() {} @@ -91,4 +93,5 @@ class Directory { // Parses everything except for caps. void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset); -}; \ No newline at end of file +}; + diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.cpp b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.cpp index 64aa20a..8a0b757 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.cpp +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.cpp @@ -4,6 +4,7 @@ #include #include + namespace { const uint32_t kSentinel = 0xBEEFDEAD; @@ -144,3 +145,5 @@ glcr::ErrorCode VFSServerBase::HandleRequest(const glcr::ByteBuffer& request, } return glcr::OK; } + + diff --git a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.h b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.h index 1be2e9f..b1a3085 100644 --- a/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.h +++ b/sys/victoriafalls/lib/victoriafalls/victoriafalls.yunq.server.h @@ -10,6 +10,8 @@ + + class VFSServerBase { public: VFSServerBase(z_cap_t VFS_cap) : endpoint_(VFS_cap) {} @@ -43,3 +45,5 @@ class VFSServerBase { glcr::CapBuffer& resp_caps); }; + + diff --git a/sys/victoriafalls/victoriafalls.cpp b/sys/victoriafalls/victoriafalls.cpp index bfc671d..493328d 100644 --- a/sys/victoriafalls/victoriafalls.cpp +++ b/sys/victoriafalls/victoriafalls.cpp @@ -5,6 +5,10 @@ #include "fs/ext2/ext2_driver.h" #include "victoriafalls_server.h" +using yellowstone::DenaliInfo; +using yellowstone::RegisterEndpointRequest; +using yellowstone::YellowstoneClient; + uint64_t main(uint64_t init_cap) { ParseInitPort(init_cap); diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.cpp b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.cpp index df1c323..a81f086 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.cpp +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.cpp @@ -8,6 +8,7 @@ + VoyageursClient::~VoyageursClient() { if (endpoint_ != 0) { check(ZCapRelease(endpoint_)); @@ -52,3 +53,5 @@ glcr::ErrorCode VoyageursClient::RegisterKeyboardListener(const KeyboardListener } + + diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.h b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.h index 48b784c..acf97b4 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.h +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.client.h @@ -8,6 +8,7 @@ #include "voyageurs.yunq.h" + class VoyageursClient { public: VoyageursClient(z_cap_t Voyageurs_cap) : endpoint_(Voyageurs_cap) {} @@ -29,3 +30,4 @@ class VoyageursClient { uint64_t kCapBufferSize = 0x10; glcr::CapBuffer cap_buffer_{kCapBufferSize}; }; + diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.cpp b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.cpp index 050800a..47bb980 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.cpp +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.cpp @@ -1,6 +1,7 @@ // Generated file -- DO NOT MODIFY. #include "voyageurs.yunq.h" + namespace { const uint64_t header_size = 24; // 4x uint32, 1x uint64 @@ -74,4 +75,5 @@ uint64_t KeyboardListener::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t of WriteHeader(bytes, offset, core_size, next_extension); return next_extension; -} \ No newline at end of file +} + diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.h b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.h index a182d8e..9ba009c 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.h +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.h @@ -6,6 +6,8 @@ #include #include #include + + class KeyboardListener { public: KeyboardListener() {} @@ -25,4 +27,5 @@ class KeyboardListener { // Parses everything except for caps. void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset); -}; \ No newline at end of file +}; + diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.cpp b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.cpp index bd90ab2..02c163f 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.cpp +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.cpp @@ -4,6 +4,7 @@ #include #include + namespace { const uint32_t kSentinel = 0xBEEFDEAD; @@ -122,3 +123,5 @@ glcr::ErrorCode VoyageursServerBase::HandleRequest(const glcr::ByteBuffer& reque } return glcr::OK; } + + diff --git a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.h b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.h index f349e3b..faa60df 100644 --- a/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.h +++ b/sys/voyageurs/lib/voyageurs/voyageurs.yunq.server.h @@ -10,6 +10,8 @@ + + class VoyageursServerBase { public: VoyageursServerBase(z_cap_t Voyageurs_cap) : endpoint_(Voyageurs_cap) {} @@ -39,3 +41,5 @@ class VoyageursServerBase { glcr::CapBuffer& resp_caps); }; + + diff --git a/sys/voyageurs/voyageurs.cpp b/sys/voyageurs/voyageurs.cpp index 0ecb5d8..f3d375f 100644 --- a/sys/voyageurs/voyageurs.cpp +++ b/sys/voyageurs/voyageurs.cpp @@ -6,6 +6,9 @@ #include "keyboard/keyboard_driver.h" #include "voyageurs_server.h" +using yellowstone::RegisterEndpointRequest; +using yellowstone::YellowstoneClient; + uint64_t main(uint64_t init_port) { ParseInitPort(init_port); diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq b/sys/yellowstone/lib/yellowstone/yellowstone.yunq index 25dd9d2..95b3dfb 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq @@ -1,3 +1,5 @@ +package yellowstone; + interface Yellowstone { method RegisterEndpoint(RegisterEndpointRequest) -> (); method GetEndpoint(GetEndpointRequest) -> (Endpoint); diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.cpp b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.cpp index 4dd4d8b..be8623c 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.cpp +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.cpp @@ -7,6 +7,9 @@ #include +namespace yellowstone { + + YellowstoneClient::~YellowstoneClient() { if (endpoint_ != 0) { @@ -208,3 +211,7 @@ glcr::ErrorCode YellowstoneClient::GetDenali(DenaliInfo& response) { } + + + +} // namepace yellowstone diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.h b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.h index 93371e8..a758d78 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.h +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.client.h @@ -8,6 +8,9 @@ #include "yellowstone.yunq.h" + +namespace yellowstone { + class YellowstoneClient { public: YellowstoneClient(z_cap_t Yellowstone_cap) : endpoint_(Yellowstone_cap) {} @@ -45,3 +48,6 @@ class YellowstoneClient { uint64_t kCapBufferSize = 0x10; glcr::CapBuffer cap_buffer_{kCapBufferSize}; }; + + +} // namepace yellowstone diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.cpp b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.cpp index bdd21d9..9972aa9 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.cpp +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.cpp @@ -1,6 +1,9 @@ // Generated file -- DO NOT MODIFY. #include "yellowstone.yunq.h" + +namespace yellowstone { + namespace { const uint64_t header_size = 24; // 4x uint32, 1x uint64 @@ -426,4 +429,7 @@ uint64_t DenaliInfo::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t offset, WriteHeader(bytes, offset, core_size, next_extension); return next_extension; -} \ No newline at end of file +} + + +} // namepace yellowstone diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.h b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.h index 2ad9d3e..c74c987 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.h +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.h @@ -6,6 +6,10 @@ #include #include #include + + +namespace yellowstone { + class RegisterEndpointRequest { public: RegisterEndpointRequest() {} @@ -170,4 +174,7 @@ class DenaliInfo { // Parses everything except for caps. void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset); -}; \ No newline at end of file +}; + + +} // namepace yellowstone diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.cpp b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.cpp index e05cda0..081fd1a 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.cpp +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.cpp @@ -4,6 +4,9 @@ #include #include + +namespace yellowstone { + namespace { const uint32_t kSentinel = 0xBEEFDEAD; @@ -193,3 +196,7 @@ glcr::ErrorCode YellowstoneServerBase::HandleRequest(const glcr::ByteBuffer& req } return glcr::OK; } + + + +} // namepace yellowstone diff --git a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.h b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.h index 1b829ef..af962fc 100644 --- a/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.h +++ b/sys/yellowstone/lib/yellowstone/yellowstone.yunq.server.h @@ -9,6 +9,10 @@ #include "yellowstone.yunq.client.h" +namespace yellowstone { + + + class YellowstoneServerBase { public: @@ -55,3 +59,7 @@ class YellowstoneServerBase { glcr::CapBuffer& resp_caps); }; + + + +} // namepace yellowstone diff --git a/sys/yellowstone/yellowstone.cpp b/sys/yellowstone/yellowstone.cpp index b4f16ae..d23c81a 100644 --- a/sys/yellowstone/yellowstone.cpp +++ b/sys/yellowstone/yellowstone.cpp @@ -22,7 +22,7 @@ uint64_t main(uint64_t port_cap) { check(ParseInitPort(port_cap)); dbgln("Yellowstone Initializing."); - ASSIGN_OR_RETURN(auto server, YellowstoneServer::Create()); + ASSIGN_OR_RETURN(auto server, yellowstone::YellowstoneServer::Create()); Thread server_thread = server->RunServer(); ASSIGN_OR_RETURN(uint64_t client_cap, server->CreateClientCap()); diff --git a/sys/yellowstone/yellowstone_server.cpp b/sys/yellowstone/yellowstone_server.cpp index f22b36e..ea8aca1 100644 --- a/sys/yellowstone/yellowstone_server.cpp +++ b/sys/yellowstone/yellowstone_server.cpp @@ -11,6 +11,7 @@ #include "hw/gpt.h" #include "hw/pcie.h" +namespace yellowstone { namespace { struct PartitionInfo { @@ -125,3 +126,5 @@ void YellowstoneServer::WaitDenaliRegistered() { has_denali_semaphore_.Wait(); } void YellowstoneServer::WaitVictoriaFallsRegistered() { has_victoriafalls_semaphore_.Wait(); } + +} // namespace yellowstone diff --git a/sys/yellowstone/yellowstone_server.h b/sys/yellowstone/yellowstone_server.h index 3eca509..03982a8 100644 --- a/sys/yellowstone/yellowstone_server.h +++ b/sys/yellowstone/yellowstone_server.h @@ -10,6 +10,8 @@ #include "hw/pcie.h" #include "lib/yellowstone/yellowstone.yunq.server.h" +namespace yellowstone { + class YellowstoneServer : public YellowstoneServerBase { public: static glcr::ErrorOr> Create(); @@ -39,3 +41,5 @@ class YellowstoneServer : public YellowstoneServerBase { YellowstoneServer(z_cap_t endpoint_cap); }; + +} // namespace yellowstone