aboutsummaryrefslogtreecommitdiff
path: root/examples/message_passing/src/main2.zig
blob: c56f76fd12edc9829dd335608a0ab03ee0c5e15d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: 2024 Himbeer <himbeer@disroot.org>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

const srvre_sys = @import("srvre_sys");
const os = srvre_sys.os;

usingnamespace srvre_sys;

pub fn main() void {
    _ = os.consoleWrite("Hello from program 2\r\n") catch unreachable;

    os.pass(0, 0, false, "Anonymous message") catch unreachable;
    os.pass(0, 0, true, "Identified message") catch unreachable;
    os.pass(1, 0, false, "Mischanneled message") catch unreachable;
    os.pass(0, 1, false, "Unicast message") catch unreachable;
    os.pass(0, 2, false, "Misdirected message") catch unreachable;
}