use core::ffi::{c_int, c_void};

use super::sys_time::{__ygg_timespec_t, __ygg_timeval_t};

pub const FD_BITS_PER_WORD: usize = 64;
pub const FD_SETSIZE: usize = FD_BITS_PER_WORD * 4;

#[repr(C)]
pub struct fd_set {
    __bits: [u64; 4],
}

// TODO sigmask: *const sigset_t
#[no_mangle]
unsafe extern "C" fn pselect(
    _nfds: c_int,
    _readfds: *mut fd_set,
    _writefds: *mut fd_set,
    _errorfds: *mut fd_set,
    _timeout: *const __ygg_timespec_t,
    _sigmask: *const c_void,
) -> c_int {
    todo!()
}

#[no_mangle]
unsafe extern "C" fn select(
    _nfds: c_int,
    _readfds: *mut fd_set,
    _writefds: *mut fd_set,
    _errorfds: *mut fd_set,
    _timeout: *const __ygg_timeval_t,
) -> c_int {
    todo!()
}
