//! K2105 service A: publishes its endpoint, then answers the readiness //! challenge with the nonce PID1 issued at launch. #![no_std] #![no_main] use turkos_os_feature_user::{call, exit}; const PUBLISH: u64 = 16; const REPLY: u64 = 17; const READY: u64 = 2; const REFUSED: u64 = 1 << 63; #[unsafe(no_mangle)] #[unsafe(link_section = ".text._start")] pub extern "C" fn _start(nonce: u64, _: u64) -> ! { if call(PUBLISH, 0x2105, 0, 0) & REFUSED != 0 { exit(1) } if call(REPLY, nonce, 1, 0) != READY { exit(2) } exit(0) }