Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

Endpoint and reply-target objects (IPC ABI v2, §5 and §6).

Re-exports§

use super::handle::ObjRef; 🔒
use super::notif::Notification; 🔒
use super::quota::InFlightCharge; 🔒
use super::quota::IpcCharge; 🔒
use crate::process::TaskId; 🔒
use crate::sync::SpinLock; 🔒
use crate::sync::WaitQueue; 🔒
use crate::syscall::error::SyscallError; 🔒
use alloc::collections::VecDeque; 🔒
use alloc::sync::Arc; 🔒
use alloc::vec::Vec; 🔒
use core::sync::atomic::AtomicU32; 🔒
use core::sync::atomic::AtomicU64; 🔒
use core::sync::atomic::Ordering; 🔒
use strat9_abi::ipc_v2::CapXfer; 🔒
use strat9_abi::ipc_v2::MsgBuf; 🔒
use strat9_abi::ipc_v2::MsgHeader; 🔒
use strat9_abi::ipc_v2::EP_DEFAULT_QUEUE_DEPTH; 🔒
use strat9_abi::ipc_v2::EP_FLAG_FASTPATH; 🔒
use strat9_abi::ipc_v2::EP_RECV; 🔒
use strat9_abi::ipc_v2::IPC_MAX_CAPS; 🔒
use strat9_abi::ipc_v2::MSG_KIND_NOTIF; 🔒

Structs§

CallSlot
Caller-side description of an in-flight call.
Endpoint
An IPC endpoint.
EpState
Endpoint state protected by the endpoint lock.
InFlight
A message waiting in an endpoint queue.
OwnedCap
A capability carried inside an in-flight message or reply payload.
PeekPlan
Shape of the endpoint head, used to size a handle-table reservation before dequeuing (§4.5 step 3).
RecvItem
Result of a successful recv.
ReplyPayload
A stored reply, ready for copy-out in the caller’s context.

Enums§

CallState
Call lifecycle (§6.2).
PopOutcome
Result of Endpoint::pop.

Statics§

NEXT_ENDPOINT_ID 🔒
Monotonic endpoint id. Internal only; never exposed to userspace.

Functions§

abandon_call
Caller-side cancellation after EINTR / ETIMEDOUT.
cancel_call
Cancel a call: bump the generation and wake the caller.
deliver_reply
Deliver a reply into a call slot. The copy to userspace happens later, in the caller’s own context.
installed_cap_wire
Build the wire CapXfer written back to a receiver.
mark_received
Mark a call as received by a server. Returns false when it was cancelled before the server dequeued it.
release_cap
Drop one reference held by a capability owned by the kernel.
release_caps
Release every capability in a payload/queue record.
release_handle
Apply the side effect of dropping a table entry.
retain_cap
Extra reference for a capability copied into a message.
retain_handle
Extra reference for a newly duplicated/inherited EP_RECV handle.