9#ifndef MAXOS_PROCESSES_IPC_H
10#define MAXOS_PROCESSES_IPC_H
15#include <libcommon/vector.h>
16#include <libcommon/string.h>
17#include <libcommon/buffer.h>
18#include <libcommon/spinlock.h>
25namespace MaxOS::processes {
48 uintptr_t m_physical_address;
51 common::Map<size_t, uintptr_t> m_mappings;
57 void open(
size_t flags)
final;
58 void close(
size_t flags)
final;
60 int read(
void* buffer,
size_t size,
size_t flags)
final;
63 [[nodiscard]]
size_t size()
const;
73 common::Vector<common::buffer_t*> m_queue { };
82 int read(
void* buffer,
size_t size,
size_t flags)
final;
83 int write(
const void* buffer,
size_t size,
size_t flags)
final;
Defines BlockingLock class for thread synchronization.
Enables a resource to be used by only one instance at a time through a combination of spinning and qu...
A block memory that is mapped into multiple processes.
size_t size() const
Gets the size of the shared memory block.
int read(void *buffer, size_t size, size_t flags) final
Get the address that the current process has this shared memory mapped to.
void close(size_t flags) final
Frees the page containing the shared memory.
uintptr_t physical_address() const
Gets the physical address of the shared memory block.
void open(size_t flags) final
Map the shared memory into the address space of the owning process.
A endpoint that allows processes to queue messages on.
int write(const void *buffer, size_t size, size_t flags) final
Handles writing to the message endpoint resource by writing the buffer as a message.
int read(void *buffer, size_t size, size_t flags) final
Reads the first message from the endpoint or will yield until a message has been written.
void send(const ipc_iovec_t *vec, size_t count)
Combines a multipart message and sends it to the endpoint.
~SharedMessageEndpoint() final
Destroys the shared message endpoint and frees all messages.
Defines classes for memory input and output operations of various bit widths (8, 16,...
Defines a PhysicalMemoryManager class for managing physical memory allocation and deallocation of pag...
Defines classes for managing process resources such as files and devices.
KPI::Resource Resource
Alias to make the libsyscore Resource accessible here.
KPI::ResourceType resource_type_t
Alias to make the libsyscore ResourceType accessible here.
Read/Write call entry for a list of I/O requests in a RPC call.