[Yellowstone] Start teton after voyageurs is available.
This commit is contained in:
parent
02d4f8c80e
commit
8fb55f56b6
|
@ -49,6 +49,10 @@ uint64_t main(uint64_t port_cap) {
|
|||
|
||||
for (glcr::StringView& file : files) {
|
||||
if (!file.empty()) {
|
||||
// TODO: Implement startup dependencies.
|
||||
if (file == "teton") {
|
||||
server->WaitVoyageursRegistered();
|
||||
}
|
||||
mmth::File binary = mmth::File::Open(glcr::StrFormat("/bin/{}", file));
|
||||
|
||||
ASSIGN_OR_RETURN(client_cap, server->CreateClientCap());
|
||||
|
|
|
@ -113,6 +113,8 @@ glcr::Status YellowstoneServer::HandleRegisterEndpoint(
|
|||
// transmit to other processes.
|
||||
mmth::SetVfsCap(req.endpoint_capability());
|
||||
has_victoriafalls_semaphore_.Signal();
|
||||
} else if (req.endpoint_name() == "voyageurs") {
|
||||
has_voyageurs_.Signal();
|
||||
} else {
|
||||
dbgln("[WARN] Got endpoint cap type: {}", req.endpoint_name().cstr());
|
||||
}
|
||||
|
@ -138,4 +140,6 @@ void YellowstoneServer::WaitVictoriaFallsRegistered() {
|
|||
has_victoriafalls_semaphore_.Wait();
|
||||
}
|
||||
|
||||
void YellowstoneServer::WaitVoyageursRegistered() { has_voyageurs_.Wait(); }
|
||||
|
||||
} // namespace yellowstone
|
||||
|
|
|
@ -25,6 +25,7 @@ class YellowstoneServer : public YellowstoneServerBase {
|
|||
|
||||
void WaitDenaliRegistered();
|
||||
void WaitVictoriaFallsRegistered();
|
||||
void WaitVoyageursRegistered();
|
||||
|
||||
private:
|
||||
glcr::HashMap<glcr::String, z_cap_t> endpoint_map_;
|
||||
|
@ -37,6 +38,7 @@ class YellowstoneServer : public YellowstoneServerBase {
|
|||
|
||||
mmth::Semaphore has_denali_semaphore_;
|
||||
mmth::Semaphore has_victoriafalls_semaphore_;
|
||||
mmth::Semaphore has_voyageurs_;
|
||||
|
||||
YellowstoneServer(z_cap_t endpoint_cap);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue