Skip to content

Commit

Permalink
Add sem_timedwait for all non-Apple UNIXes
Browse files Browse the repository at this point in the history
  • Loading branch information
jynnantonix committed Aug 19, 2016
1 parent e2ac609 commit 016d642
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ extern {
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
}

cfg_if! {
Expand Down
6 changes: 4 additions & 2 deletions src/unix/bsd/openbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,10 @@ extern {
flags: ::c_int) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
}

cfg_if! {
Expand Down
2 changes: 0 additions & 2 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,6 @@ extern {
link_name = "sem_wait$UNIX2003")]
pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
pub fn sem_post(sem: *mut sem_t) -> ::c_int;
pub fn sem_init(sem: *mut sem_t,
pshared: ::c_int,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,8 @@ extern {
cpuset: *const cpu_set_t) -> ::c_int;
pub fn unshare(flags: ::c_int) -> ::c_int;
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
}

cfg_if! {
Expand Down
2 changes: 2 additions & 0 deletions src/unix/solaris/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@ extern {
clock_id: *mut clockid_t) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
}

0 comments on commit 016d642

Please sign in to comment.