5export module zxfoundation.sys.ipc.core;
6import zxfoundation.base.types;
7import zxfoundation.memory.objects;
8import zxfoundation.dgp.domain.types;
9import zxfoundation.dgp.cap.types;
10import zxfoundation.dgp.domain.types;
11import zxfoundation.dgp.portal.types;
17namespace zxfoundation::sys::ipc {
19 auto ipc_init()
noexcept ->
void;
21 [[nodiscard]]
auto endpoint_create(
22 dgp::domain::domain& owner, u32 peer_domain
23 )
noexcept -> std::expected<u32, lib::kernel_error>;
25 [[nodiscard]]
auto endpoint_destroy(
26 dgp::domain::domain& caller, u32 endpoint_id
27 )
noexcept -> std::expected<
void, lib::kernel_error>;
29 [[nodiscard]]
auto endpoint_owned_by(
30 u32 endpoint_id, u32 domain_id
33 auto destroy_for_domain(u32 domain_id)
noexcept ->
void;
35 [[nodiscard]]
auto message_send(
36 dgp::domain::domain& caller, u32 endpoint_id,
37 const u8* payload, u32 length,
38 const dgp::cap::cap_token* capabilities, u32 capability_count,
39 const memory::objects::memory_object_ref* grants, u32 grant_count
40 )
noexcept -> std::expected<
void, lib::kernel_error>;
42 [[nodiscard]]
auto message_receive(
43 dgp::domain::domain& caller, u32 endpoint_id,
44 u8* payload, u32 payload_capacity, u32& out_length,
45 dgp::cap::cap_token* capabilities, u32& capability_count,
46 memory::objects::memory_object_ref* grants, u32& grant_count
47 )
noexcept -> std::expected<
void, lib::kernel_error>;
49 [[nodiscard]]
auto shm_export(
50 dgp::domain::domain& caller, u64 va, u64 length,
52 )
noexcept -> std::expected<dgp::cap::cap_token, lib::kernel_error>;
54 [[nodiscard]]
auto shm_import(
55 dgp::domain::domain& caller, dgp::cap::cap_token grant_token,
57 )
noexcept -> std::expected<dgp::portal::portal_binding, lib::kernel_error>;