Large reorganization of headers (WIP)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
sys_includes = ["bits/sys/select.h", "sys/time.h"]
|
||||
include_guard = "_SYS_SELECT_H"
|
||||
language = "C"
|
||||
style = "Tag"
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,20 @@
|
||||
//! sys/select.h implementation
|
||||
|
||||
use core::mem;
|
||||
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
// fd_set is defined in C because cbindgen is incompatible with mem::size_of booo
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn select(
|
||||
nfds: c_int,
|
||||
readfds: *mut fd_set,
|
||||
writefds: *mut fd_set,
|
||||
exceptfds: *mut fd_set,
|
||||
timeout: *mut timeval,
|
||||
) -> c_int {
|
||||
Sys::select(nfds, readfds, writefds, exceptfds, timeout)
|
||||
}
|
||||
Reference in New Issue
Block a user