[Mammoth] Move remaining classes to a shared folder.

This commit is contained in:
Drew Galbraith 2023-11-22 14:39:27 -08:00
parent c42fb858ba
commit 5f8d577948
39 changed files with 55 additions and 56 deletions

View file

@ -6,12 +6,12 @@ add_library(mammoth STATIC
ipc/port_server.cpp
proc/process.cpp
proc/thread.cpp
src/debug.cpp
src/init.cpp
src/memory_region.cpp
src/new.cpp
sync/mutex.cpp
sync/semaphore.cpp
util/debug.cpp
util/init.cpp
util/memory_region.cpp
util/new.cpp
)
target_include_directories(mammoth

View file

@ -2,7 +2,7 @@
#include <zcall.h>
#include "mammoth/debug.h"
#include "util/debug.h"
namespace {

View file

@ -1,6 +1,6 @@
#include "ipc/endpoint_server.h"
#include "mammoth/debug.h"
#include "util/debug.h"
// Declared as friend in EndpointServer.
void EndpointServerThreadBootstrap(void* endpoint_server) {

View file

@ -3,7 +3,7 @@
#include <glacier/status/error.h>
#include <zcall.h>
#include "mammoth/debug.h"
#include "util/debug.h"
PortClient PortClient::AdoptPort(z_cap_t cap) { return PortClient(cap); }
PortClient::PortClient(z_cap_t port_cap) : port_cap_(port_cap) {}

View file

@ -3,11 +3,11 @@
#include <glacier/status/error.h>
#include <zcall.h>
#include "mammoth/debug.h"
#include "mammoth/init.h"
#include "mammoth/ipc/endpoint_server.h"
#include "mammoth/ipc/port_client.h"
#include "mammoth/ipc/port_server.h"
#include "ipc/endpoint_server.h"
#include "ipc/port_client.h"
#include "ipc/port_server.h"
#include "util/debug.h"
#include "util/init.h"
#define MAM_PROC_DEBUG 0

View file

@ -2,8 +2,8 @@
#include <zcall.h>
#include "mammoth/debug.h"
#include "mammoth/init.h"
#include "util/debug.h"
#include "util/init.h"
namespace {

View file

@ -2,7 +2,7 @@
#include <zcall.h>
#include "mammoth/debug.h"
#include "util/debug.h"
Semaphore::Semaphore() { check(ZSemaphoreCreate(&semaphore_cap_)); }
Semaphore::~Semaphore() { check(ZCapRelease(semaphore_cap_)); }

View file

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

View file

@ -1,10 +1,10 @@
#include "mammoth/init.h"
#include "util/init.h"
#include <glacier/status/error.h>
#include <ztypes.h>
#include "mammoth/debug.h"
#include "mammoth/ipc/port_server.h"
#include "ipc/port_server.h"
#include "util/debug.h"
uint64_t gSelfProcCap = 0;
uint64_t gSelfVmasCap = 0;

View file

@ -1,9 +1,9 @@
#include "mammoth/memory_region.h"
#include "util/memory_region.h"
#include <zcall.h>
#include "mammoth/debug.h"
#include "mammoth/init.h"
#include "util/debug.h"
#include "util/init.h"
OwnedMemoryRegion::OwnedMemoryRegion(OwnedMemoryRegion&& other)
: OwnedMemoryRegion(other.vmmo_cap_, other.vaddr_, other.size_) {