[Mammoth] Move ipc calls to separate folder mammoth.
This commit is contained in:
parent
19e394ae7b
commit
ad5b55bf37
|
@ -1,22 +1,24 @@
|
||||||
add_library(mammoth STATIC
|
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/debug.cpp
|
||||||
src/endpoint_client.cpp
|
|
||||||
src/endpoint_server.cpp
|
|
||||||
src/init.cpp
|
src/init.cpp
|
||||||
src/memory_region.cpp
|
src/memory_region.cpp
|
||||||
src/mutex.cpp
|
src/mutex.cpp
|
||||||
src/new.cpp
|
src/new.cpp
|
||||||
src/process.cpp
|
src/process.cpp
|
||||||
src/port_client.cpp
|
|
||||||
src/port_server.cpp
|
|
||||||
src/semaphore.cpp
|
src/semaphore.cpp
|
||||||
src/thread.cpp
|
src/thread.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(mammoth
|
target_include_directories(mammoth
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
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
|
target_link_libraries(mammoth
|
||||||
glacier
|
glacier
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#include <glacier/status/error.h>
|
#include <glacier/status/error.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <ztypes.h>
|
||||||
#include "mammoth/endpoint_client.h"
|
|
||||||
|
|
||||||
glcr::ErrorCode SpawnProcessFromElfRegion(uint64_t program,
|
glcr::ErrorCode SpawnProcessFromElfRegion(uint64_t program,
|
||||||
z_cap_t yellowstone_client);
|
z_cap_t yellowstone_client);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "mammoth/channel.h"
|
#include "ipc/channel.h"
|
||||||
|
|
||||||
#include <zcall.h>
|
#include <zcall.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "mammoth/endpoint_server.h"
|
#include "ipc/endpoint_server.h"
|
||||||
|
|
||||||
glcr::UniquePtr<EndpointClient> EndpointClient::AdoptEndpoint(z_cap_t cap) {
|
glcr::UniquePtr<EndpointClient> EndpointClient::AdoptEndpoint(z_cap_t cap) {
|
||||||
return glcr::UniquePtr<EndpointClient>(new EndpointClient(cap));
|
return glcr::UniquePtr<EndpointClient>(new EndpointClient(cap));
|
|
@ -1,4 +1,4 @@
|
||||||
#include "mammoth/endpoint_server.h"
|
#include "ipc/endpoint_server.h"
|
||||||
|
|
||||||
#include "mammoth/debug.h"
|
#include "mammoth/debug.h"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <glacier/status/error_or.h>
|
#include <glacier/status/error_or.h>
|
||||||
#include <ztypes.h>
|
#include <ztypes.h>
|
||||||
|
|
||||||
#include "mammoth/endpoint_client.h"
|
#include "mammoth/ipc/endpoint_client.h"
|
||||||
#include "mammoth/request_context.h"
|
#include "mammoth/request_context.h"
|
||||||
#include "mammoth/response_context.h"
|
#include "mammoth/response_context.h"
|
||||||
#include "mammoth/thread.h"
|
#include "mammoth/thread.h"
|
|
@ -1,4 +1,4 @@
|
||||||
#include "mammoth/port_client.h"
|
#include "ipc/port_client.h"
|
||||||
|
|
||||||
#include <glacier/status/error.h>
|
#include <glacier/status/error.h>
|
||||||
#include <zcall.h>
|
#include <zcall.h>
|
|
@ -1,4 +1,4 @@
|
||||||
#include "mammoth/port_server.h"
|
#include "ipc/port_server.h"
|
||||||
|
|
||||||
#include <zcall.h>
|
#include <zcall.h>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <glacier/status/error_or.h>
|
#include <glacier/status/error_or.h>
|
||||||
#include <ztypes.h>
|
#include <ztypes.h>
|
||||||
|
|
||||||
#include "mammoth/port_client.h"
|
#include "mammoth/ipc/port_client.h"
|
||||||
|
|
||||||
class PortServer {
|
class PortServer {
|
||||||
public:
|
public:
|
|
@ -4,7 +4,7 @@
|
||||||
#include <ztypes.h>
|
#include <ztypes.h>
|
||||||
|
|
||||||
#include "mammoth/debug.h"
|
#include "mammoth/debug.h"
|
||||||
#include "mammoth/port_server.h"
|
#include "mammoth/ipc/port_server.h"
|
||||||
|
|
||||||
uint64_t gSelfProcCap = 0;
|
uint64_t gSelfProcCap = 0;
|
||||||
uint64_t gSelfVmasCap = 0;
|
uint64_t gSelfVmasCap = 0;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
#include <zcall.h>
|
#include <zcall.h>
|
||||||
|
|
||||||
#include "mammoth/debug.h"
|
#include "mammoth/debug.h"
|
||||||
#include "mammoth/endpoint_server.h"
|
|
||||||
#include "mammoth/init.h"
|
#include "mammoth/init.h"
|
||||||
#include "mammoth/port_client.h"
|
#include "mammoth/ipc/endpoint_server.h"
|
||||||
#include "mammoth/port_server.h"
|
#include "mammoth/ipc/port_client.h"
|
||||||
|
#include "mammoth/ipc/port_server.h"
|
||||||
|
|
||||||
#define MAM_PROC_DEBUG 0
|
#define MAM_PROC_DEBUG 0
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
#include <mammoth/debug.h>
|
#include <mammoth/debug.h>
|
||||||
#include <mammoth/endpoint_server.h>
|
|
||||||
#include <mammoth/init.h>
|
#include <mammoth/init.h>
|
||||||
#include <mammoth/port_client.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <yellowstone/yellowstone.yunq.client.h>
|
#include <yellowstone/yellowstone.yunq.client.h>
|
||||||
|
|
||||||
|
@ -11,8 +9,6 @@
|
||||||
|
|
||||||
uint64_t main(uint64_t init_port_cap) {
|
uint64_t main(uint64_t init_port_cap) {
|
||||||
check(ParseInitPort(init_port_cap));
|
check(ParseInitPort(init_port_cap));
|
||||||
glcr::UniquePtr<EndpointClient> yellowstone =
|
|
||||||
EndpointClient::AdoptEndpoint(gInitEndpointCap);
|
|
||||||
|
|
||||||
YellowstoneClient stub(gInitEndpointCap);
|
YellowstoneClient stub(gInitEndpointCap);
|
||||||
Empty empty;
|
Empty empty;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <glacier/status/error.h>
|
#include <glacier/status/error.h>
|
||||||
#include <mammoth/endpoint_server.h>
|
|
||||||
|
|
||||||
#include "ahci/ahci_driver.h"
|
#include "ahci/ahci_driver.h"
|
||||||
#include "lib/denali/denali.yunq.server.h"
|
#include "lib/denali/denali.yunq.server.h"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <glacier/string/str_format.h>
|
#include <glacier/string/str_format.h>
|
||||||
#include <glacier/string/str_split.h>
|
#include <glacier/string/str_split.h>
|
||||||
#include <mammoth/debug.h>
|
#include <mammoth/debug.h>
|
||||||
#include <mammoth/endpoint_client.h>
|
|
||||||
#include <mammoth/init.h>
|
#include <mammoth/init.h>
|
||||||
#include <mammoth/memory_region.h>
|
#include <mammoth/memory_region.h>
|
||||||
#include <mammoth/process.h>
|
#include <mammoth/process.h>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <mammoth/memory_region.h>
|
#include <mammoth/memory_region.h>
|
||||||
#include <mammoth/process.h>
|
#include <mammoth/process.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <zcall.h>
|
||||||
|
|
||||||
#include "hw/gpt.h"
|
#include "hw/gpt.h"
|
||||||
#include "hw/pcie.h"
|
#include "hw/pcie.h"
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <glacier/memory/shared_ptr.h>
|
#include <glacier/memory/shared_ptr.h>
|
||||||
#include <glacier/memory/unique_ptr.h>
|
#include <glacier/memory/unique_ptr.h>
|
||||||
#include <glacier/status/error_or.h>
|
#include <glacier/status/error_or.h>
|
||||||
#include <mammoth/endpoint_server.h>
|
|
||||||
#include <mammoth/port_server.h>
|
|
||||||
#include <mammoth/semaphore.h>
|
#include <mammoth/semaphore.h>
|
||||||
#include <mammoth/thread.h>
|
#include <mammoth/thread.h>
|
||||||
#include <victoriafalls/victoriafalls.yunq.client.h>
|
#include <victoriafalls/victoriafalls.yunq.client.h>
|
||||||
|
|
Loading…
Reference in New Issue