Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,7 @@ extern "C" {
len: size_t,
flags: c_uint,
) -> ssize_t;
pub fn eventfd(init: c_uint, flags: c_int) -> c_int;
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int;
pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int;
pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4700,7 +4700,7 @@ extern "C" {
pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int;
pub fn setaudit(auditinfo: *const auditinfo_t) -> c_int;

pub fn eventfd(init: c_uint, flags: c_int) -> c_int;
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int;
pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;

Expand Down
10 changes: 10 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{
};

pub type blksize_t = i32;
pub type eventfd_t = u64;
pub type fsblkcnt_t = u64;
pub type fsfilcnt_t = u64;
pub type idtype_t = c_int;
Expand Down Expand Up @@ -1742,6 +1743,11 @@ pub const RTA_TAG: c_int = 0x100;
pub const RTAX_TAG: c_int = 8;
pub const RTAX_MAX: c_int = 9;

// For eventfd
pub const EFD_SEMAPHORE: c_int = crate::O_RDWR;
pub const EFD_NONBLOCK: c_int = crate::O_NONBLOCK;
pub const EFD_CLOEXEC: c_int = crate::O_CLOEXEC;

// sys/timerfd.h
pub const TFD_CLOEXEC: i32 = crate::O_CLOEXEC;
pub const TFD_NONBLOCK: i32 = crate::O_NONBLOCK;
Expand Down Expand Up @@ -2197,6 +2203,10 @@ extern "C" {
pub fn getmntinfo(mntbufp: *mut *mut crate::statvfs, flags: c_int) -> c_int;
pub fn getvfsstat(buf: *mut crate::statvfs, bufsize: size_t, flags: c_int) -> c_int;

pub fn eventfd(val: c_uint, flags: c_int) -> c_int;
pub fn eventfd_read(efd: c_int, valp: *mut eventfd_t) -> c_int;
pub fn eventfd_write(efd: c_int, val: eventfd_t) -> c_int;

// Added in `NetBSD` 10.0
pub fn timerfd_create(clockid: crate::clockid_t, flags: c_int) -> c_int;
pub fn timerfd_gettime(fd: c_int, curr_value: *mut crate::itimerspec) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3526,7 +3526,7 @@ extern "C" {
len: size_t,
flags: c_uint,
) -> ssize_t;
pub fn eventfd(init: c_uint, flags: c_int) -> c_int;
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int;
pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;
pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6088,7 +6088,7 @@ extern "C" {
len: size_t,
flags: c_uint,
) -> ssize_t;
pub fn eventfd(init: c_uint, flags: c_int) -> c_int;
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int;
pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;

Expand Down
2 changes: 1 addition & 1 deletion src/unix/solarish/illumos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ pub const TFD_TIMER_ABSTIME: i32 = 1 << 0;
pub const TFD_TIMER_CANCEL_ON_SET: i32 = 1 << 1;

extern "C" {
pub fn eventfd(init: c_uint, flags: c_int) -> c_int;
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;

pub fn epoll_pwait(
epfd: c_int,
Expand Down
Loading