Files @ 0e1a76667937
Branch filter:

Location: CSY/reowolf/src/runtime2/communication.rs

0e1a76667937 585 B application/rls-services+xml Show Annotation Show as Raw Download as Raw
MH
Started work on speculationless runtime
use super::runtime::*;

#[derive(Copy, Clone)]
pub struct PortId(pub u32);

impl PortId {
    pub fn new_invalid() -> Self {
        return Self(u32::MAX);
    }
}

pub struct Peer {
    pub id: CompId,
    pub(crate) handle: CompHandle,
}

pub enum PortKind {
    Putter,
    Getter,
}

pub enum PortState {
    Open,
    Closed,
}

pub struct Port {
    pub self_id: PortId,
    pub peer_id: PortId,
    pub kind: PortKind,
    pub state: PortState,
    pub local_peer_index: u32,
}

/// Public inbox: accessible by all threads. Essentially a MPSC channel
pub struct InboxPublic {

}