[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

@ -1,22 +1,24 @@
add_library(mammoth STATIC
src/channel.cpp
ipc/channel.cpp
ipc/endpoint_client.cpp
ipc/endpoint_server.cpp
ipc/port_client.cpp
ipc/port_server.cpp
src/debug.cpp
src/endpoint_client.cpp
src/endpoint_server.cpp
src/init.cpp
src/memory_region.cpp
src/mutex.cpp
src/new.cpp
src/process.cpp
src/port_client.cpp
src/port_server.cpp
src/semaphore.cpp
src/thread.cpp
)
target_include_directories(mammoth
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
"${CMAKE_CURRENT_SOURCE_DIR}/.."
)
target_link_libraries(mammoth
glacier

View file

@ -2,8 +2,7 @@
#include <glacier/status/error.h>
#include <stdint.h>
#include "mammoth/endpoint_client.h"
#include <ztypes.h>
glcr::ErrorCode SpawnProcessFromElfRegion(uint64_t program,
z_cap_t yellowstone_client);

View file

@ -1,4 +1,4 @@
#include "mammoth/channel.h"
#include "ipc/channel.h"
#include <zcall.h>

View file

@ -1,4 +1,4 @@
#include "mammoth/endpoint_server.h"
#include "ipc/endpoint_server.h"
glcr::UniquePtr<EndpointClient> EndpointClient::AdoptEndpoint(z_cap_t cap) {
return glcr::UniquePtr<EndpointClient>(new EndpointClient(cap));

View file

@ -1,4 +1,4 @@
#include "mammoth/endpoint_server.h"
#include "ipc/endpoint_server.h"
#include "mammoth/debug.h"

View file

@ -4,7 +4,7 @@
#include <glacier/status/error_or.h>
#include <ztypes.h>
#include "mammoth/endpoint_client.h"
#include "mammoth/ipc/endpoint_client.h"
#include "mammoth/request_context.h"
#include "mammoth/response_context.h"
#include "mammoth/thread.h"

View file

@ -1,4 +1,4 @@
#include "mammoth/port_client.h"
#include "ipc/port_client.h"
#include <glacier/status/error.h>
#include <zcall.h>

View file

@ -1,4 +1,4 @@
#include "mammoth/port_server.h"
#include "ipc/port_server.h"
#include <zcall.h>

View file

@ -3,7 +3,7 @@
#include <glacier/status/error_or.h>
#include <ztypes.h>
#include "mammoth/port_client.h"
#include "mammoth/ipc/port_client.h"
class PortServer {
public:

View file

@ -4,7 +4,7 @@
#include <ztypes.h>
#include "mammoth/debug.h"
#include "mammoth/port_server.h"
#include "mammoth/ipc/port_server.h"
uint64_t gSelfProcCap = 0;
uint64_t gSelfVmasCap = 0;

View file

@ -4,10 +4,10 @@
#include <zcall.h>
#include "mammoth/debug.h"
#include "mammoth/endpoint_server.h"
#include "mammoth/init.h"
#include "mammoth/port_client.h"
#include "mammoth/port_server.h"
#include "mammoth/ipc/endpoint_server.h"
#include "mammoth/ipc/port_client.h"
#include "mammoth/ipc/port_server.h"
#define MAM_PROC_DEBUG 0