[Mammoth] Move ipc calls to separate folder mammoth.

This commit is contained in:
Drew Galbraith 2023-11-22 13:41:14 -08:00
parent 19e394ae7b
commit ad5b55bf37
19 changed files with 21 additions and 27 deletions

View file

@ -0,0 +1,14 @@
#include "ipc/port_client.h"
#include <glacier/status/error.h>
#include <zcall.h>
#include "mammoth/debug.h"
PortClient PortClient::AdoptPort(z_cap_t cap) { return PortClient(cap); }
PortClient::PortClient(z_cap_t port_cap) : port_cap_(port_cap) {}
glcr::ErrorCode PortClient::WriteString(glcr::String str, z_cap_t cap) {
return static_cast<glcr::ErrorCode>(
ZPortSend(port_cap_, str.length() + 1, str.cstr(), 1, &cap));
}