[Mammoth] Move ipc calls to separate folder mammoth.
This commit is contained in:
parent
19e394ae7b
commit
ad5b55bf37
19 changed files with 21 additions and 27 deletions
14
lib/mammoth/ipc/port_client.cpp
Normal file
14
lib/mammoth/ipc/port_client.cpp
Normal 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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue