<commit_before>use crate::os::raw::c_int;

mod fs;
pub mod sockets;
pub use self::fs::*;

pub const SOLID_BP_PROGRAM_EXITED: usize = 15;
pub const SOLID_BP_CSABORT: usize = 16;

#[inline(always)]
pub fn breakpoint_program_exited(tid: usize) {
    unsafe {
        match () {
            #[cfg(target_arch = "arm")]
            () => asm!("bkpt #{}", const SOLID_BP_PROGRAM_EXITED, in("r0") tid),
            #[cfg(target_arch = "aarch64")]
            () => asm!("hlt #{}", const SOLID_BP_PROGRAM_EXITED, in("x0") tid),
        }
    }
}

#[inline(always)]
pub fn breakpoint_abort() {
    unsafe {
        match () {
            #[cfg(target_arch = "arm")]
            () => asm!("bkpt #{}", const SOLID_BP_CSABORT),
            #[cfg(target_arch = "aarch64")]
            () => asm!("hlt #{}", const SOLID_BP_CSABORT),
        }
    }
}

// `solid_types.h`
pub use super::itron::abi::{ER, ER_ID, E_TMOUT, ID};

pub const SOLID_ERR_NOTFOUND: ER = -1000;
pub const SOLID_ERR_NOTSUPPORTED: ER = -1001;<commit_msg>Rollup merge of #90690 - solid-rs:fix-kmc-solid-asm-const, r=Mark-Simulacrum<commit_after>use crate::os::raw::c_int;

mod fs;
pub mod sockets;
pub use self::fs::*;

#[inline(always)]
pub fn breakpoint_program_exited(tid: usize) {
    unsafe {
        match () {
            // SOLID_BP_PROGRAM_EXITED = 15
            #[cfg(target_arch = "arm")]
            () => asm!("bkpt #15", in("r0") tid),
            #[cfg(target_arch = "aarch64")]
            () => asm!("hlt #15", in("x0") tid),
        }
    }
}

#[inline(always)]
pub fn breakpoint_abort() {
    unsafe {
        match () {
            // SOLID_BP_CSABORT = 16
            #[cfg(target_arch = "arm")]
            () => asm!("bkpt #16"),
            #[cfg(target_arch = "aarch64")]
            () => asm!("hlt #16"),
        }
    }
}

// `solid_types.h`
pub use super::itron::abi::{ER, ER_ID, E_TMOUT, ID};

pub const SOLID_ERR_NOTFOUND: ER = -1000;
pub const SOLID_ERR_NOTSUPPORTED: ER = -1001;
{'fraction_non_alphanumeric': 0.18038617886178862, 'fraction_numerical': 0.024898373983739838, 'mean_word_length': 2.547747747747748, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7132965', 'n_tokens_mistral': 777, 'n_tokens_neox': 748, 'n_words': 142}