First iteration of denali server

This commit is contained in:
Drew Galbraith 2023-06-15 16:20:29 -07:00
parent 82b1a5c4db
commit ffa2d97a64
18 changed files with 273 additions and 39 deletions

View file

@ -33,7 +33,7 @@ z_err_t Channel::WriteStr(const char* msg) {
if (!chan_cap_) {
return Z_ERR_NULL;
}
uint64_t type = 11;
uint64_t type = 0;
return ZChannelSend(chan_cap_, type, strlen(msg),
reinterpret_cast<const uint8_t*>(msg), 0, 0);
}

View file

@ -93,8 +93,8 @@ uint64_t LoadElfProgram(uint64_t base, uint64_t as_cap) {
} // namespace
uint64_t SpawnProcessFromElfRegion(uint64_t program) {
Channel local, foreign;
uint64_t SpawnProcessFromElfRegion(uint64_t program, Channel& local) {
Channel foreign;
check(CreateChannels(local, foreign));
#if MAM_PROC_DEBUG
@ -118,7 +118,5 @@ uint64_t SpawnProcessFromElfRegion(uint64_t program) {
#endif
check(ZThreadStart(thread_cap, entry_point, foreign_chan_id, 0));
local.WriteStr("Hello!");
return Z_OK;
}