//! Thread option definitions

/// Thread signal stack
#[derive(Clone, Copy, Debug, Default)]
pub struct ThreadSignalStack {
    /// Base address
    pub base: usize,
    /// Size
    pub size: usize,
}

option_group!(
    #[doc = "Thread options"]
    pub enum ThreadOptionVariant<'a> {
        #[doc = "Thread-local storage pointer"]
        0x1000: ThreadPointer # 8(usize),
        #[doc = "Signal stack information"]
        0x1001: SignalStack # 16(ThreadSignalStack),
        #[doc = "Thread display name"]
        0x1002: Name(&'a str),
    }
);

abi_serde::impl_struct_serde!(ThreadSignalStack: [base, size]);
