[Mammoth] Move remaining classes to a shared folder.
This commit is contained in:
parent
c42fb858ba
commit
5f8d577948
|
@ -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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <zcall.h>
|
||||
|
||||
#include "mammoth/debug.h"
|
||||
#include "util/debug.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <zcall.h>
|
||||
|
||||
#include "mammoth/debug.h"
|
||||
#include "mammoth/init.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/init.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -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_)); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "include/mammoth/debug.h"
|
||||
#include "util/debug.h"
|
||||
|
||||
#include <glacier/status/error.h>
|
||||
#include <zcall.h>
|
|
@ -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;
|
|
@ -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_) {
|
|
@ -1,7 +1,7 @@
|
|||
#include "ahci/ahci_device.h"
|
||||
|
||||
#include <glacier/status/error.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <string.h>
|
||||
#include <zcall.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/status/error.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
#include "ahci/ahci.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <glacier/status/error.h>
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <stdint.h>
|
||||
#include <zcall.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <stdint.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <glacier/memory/move.h>
|
||||
#include <glacier/status/error.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
glcr::ErrorOr<glcr::UniquePtr<DenaliServer>> DenaliServer::Create(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Generated file -- DO NOT MODIFY.
|
||||
#include "denali.yunq.server.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "framebuffer/console.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
|
||||
void Console::WriteChar(char c) {
|
||||
if (c == '\n') {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <yellowstone/yellowstone.yunq.h>
|
||||
|
||||
class Framebuffer {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "framebuffer/psf.h"
|
||||
|
||||
#include <glacier/memory/move.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
|
||||
struct PsfHeader {
|
||||
uint32_t magic; /* magic bytes to identify PSF */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <victoriafalls/victoriafalls.yunq.client.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "fs/ext2/ext2_block_reader.h"
|
||||
|
||||
#include "mammoth/debug.h"
|
||||
#include <mammoth/util/debug.h>
|
||||
|
||||
glcr::ErrorOr<glcr::SharedPtr<Ext2BlockReader>> Ext2BlockReader::Init(
|
||||
const DenaliInfo& denali_info) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <denali/denali.yunq.client.h>
|
||||
#include <glacier/memory/shared_ptr.h>
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <yellowstone/yellowstone.yunq.h>
|
||||
|
||||
#include "fs/ext2/ext2.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "fs/ext2/ext2_driver.h"
|
||||
|
||||
#include <glacier/string/string.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
|
||||
glcr::ErrorOr<Ext2Driver> Ext2Driver::Init(const DenaliInfo& denali_info) {
|
||||
ASSIGN_OR_RETURN(glcr::SharedPtr<Ext2BlockReader> reader,
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include "fs/ext2/inode_table.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
|
||||
InodeTable::InodeTable(const glcr::SharedPtr<Ext2BlockReader>& reader,
|
||||
OwnedMemoryRegion&& bgdt_region)
|
||||
: ext2_reader_(reader),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/container/vector.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "fs/ext2/ext2_block_reader.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Generated file -- DO NOT MODIFY.
|
||||
#include "victoriafalls.yunq.server.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
|
||||
#include "fs/ext2/ext2_driver.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "victoriafalls_server.h"
|
||||
|
||||
#include <glacier/string/str_split.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
glcr::ErrorOr<glcr::UniquePtr<VFSServer>> VFSServer::Create(
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <glacier/memory/move.h>
|
||||
#include <glacier/status/error.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <zcall.h>
|
||||
#include <zglobal.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "hw/pcie.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <zcall.h>
|
||||
|
||||
#define PCI_DEBUG 0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Generated file -- DO NOT MODIFY.
|
||||
#include "yellowstone.yunq.server.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include <glacier/string/str_format.h>
|
||||
#include <glacier/string/str_split.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/proc/process.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <zcall.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <denali/denali.yunq.client.h>
|
||||
#include <glacier/string/string.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <mammoth/util/init.h>
|
||||
#include <mammoth/util/memory_region.h>
|
||||
#include <stdlib.h>
|
||||
#include <zcall.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Generated file -- DO NOT MODIFY.
|
||||
#include "{{file}}.server.h"
|
||||
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in New Issue