//! System call implementations

#[cfg(any(target_arch = "aarch64", rust_analyzer))]
#[macro_use]
mod aarch64;
#[cfg(any(target_arch = "x86_64", rust_analyzer))]
#[macro_use]
mod x86_64;
#[cfg(any(target_arch = "riscv64", rust_analyzer))]
#[macro_use]
mod riscv64;

#[allow(missing_docs, unreachable_code)]
mod generated {
    // Import all the necessary types from generated ABI
    use abi::{
        debug::TraceLevel,
        error::Error,
        io::{
            AccessMode, DirectoryEntry, FileAttr, FileMode, FileSync, MountOptions, OpenOptions,
            PollControl, RawFd, RemoveFlags, TerminalOptions, TerminalSize, TimerOptions,
            UnmountOptions,
        },
        mem::{MappingFlags, MappingSource},
        net::{SocketShutdown, SocketType},
        process::{
            ExecveOptions, ProcessGroupId, ProcessId, Signal, SignalEntryData, SpawnOptions,
            ThreadSpawnOptions, WaitFlags,
        },
        SyscallFunction,
    };

    include!(concat!(env!("OUT_DIR"), "/generated_calls.rs"));
}

pub use generated::*;
