[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

View File

@ -1,8 +1,6 @@
#include <mammoth/debug.h>
#include <mammoth/endpoint_server.h>
#include <mammoth/init.h>
#include <mammoth/port_client.h>
#include <stdint.h>
#include <yellowstone/yellowstone.yunq.client.h>
@ -11,8 +9,6 @@
uint64_t main(uint64_t init_port_cap) {
check(ParseInitPort(init_port_cap));
glcr::UniquePtr<EndpointClient> yellowstone =
EndpointClient::AdoptEndpoint(gInitEndpointCap);
YellowstoneClient stub(gInitEndpointCap);
Empty empty;

View File

@ -1,7 +1,6 @@
#pragma once
#include <glacier/status/error.h>
#include <mammoth/endpoint_server.h>
#include "ahci/ahci_driver.h"
#include "lib/denali/denali.yunq.server.h"

View File

@ -1,7 +1,6 @@
#include <glacier/string/str_format.h>
#include <glacier/string/str_split.h>
#include <mammoth/debug.h>
#include <mammoth/endpoint_client.h>
#include <mammoth/init.h>
#include <mammoth/memory_region.h>
#include <mammoth/process.h>

View File

@ -7,6 +7,7 @@
#include <mammoth/memory_region.h>
#include <mammoth/process.h>
#include <stdlib.h>
#include <zcall.h>
#include "hw/gpt.h"
#include "hw/pcie.h"

View File

@ -4,8 +4,6 @@
#include <glacier/memory/shared_ptr.h>
#include <glacier/memory/unique_ptr.h>
#include <glacier/status/error_or.h>
#include <mammoth/endpoint_server.h>
#include <mammoth/port_server.h>
#include <mammoth/semaphore.h>
#include <mammoth/thread.h>
#include <victoriafalls/victoriafalls.yunq.client.h>