Skip to content

Add sigwait/sigwaitinfo/sigtimedwait. #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 29, 2016
Merged
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
5 changes: 5 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,11 @@ extern {
hdtr: *mut ::sf_hdtr,
sbytes: *mut ::off_t,
flags: ::c_int) -> ::c_int;
pub fn sigtimedwait(set: *const sigset_t,
info: *mut siginfo_t,
timeout: *const ::timespec) -> ::c_int;
pub fn sigwaitinfo(set: *const sigset_t,
info: *mut siginfo_t) -> ::c_int;
}

cfg_if! {
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/openbsdlike/netbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,10 @@ extern {
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
stackaddr: *mut *mut ::c_void,
stacksize: *mut ::size_t) -> ::c_int;
#[link_name = "__sigtimedwait50"]
pub fn sigtimedwait(set: *const sigset_t,
info: *mut siginfo_t,
timeout: *const ::timespec) -> ::c_int;
pub fn sigwaitinfo(set: *const sigset_t,
info: *mut siginfo_t) -> ::c_int;
}
4 changes: 4 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ extern {
#[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
pub fn sigaltstack(ss: *const stack_t,
oss: *mut stack_t) -> ::c_int;
#[cfg_attr(all(target_os = "macos", target_arch ="x86"),
link_name = "sigwait$UNIX2003")]
pub fn sigwait(set: *const sigset_t,
sig: *mut ::c_int) -> ::c_int;

#[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
pub fn utimes(filename: *const ::c_char,
Expand Down
5 changes: 5 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@ extern {
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
pub fn sigtimedwait(set: *const sigset_t,
info: *mut siginfo_t,
timeout: *const ::timespec) -> ::c_int;
pub fn sigwaitinfo(set: *const sigset_t,
info: *mut siginfo_t) -> ::c_int;
}

cfg_if! {
Expand Down