Skip to content

Commit 45179c9

Browse files
committed
Add pthread_mutex_timedlock
1 parent 858092c commit 45179c9

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,8 @@ extern {
862862
pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
863863
pub fn sem_timedwait(sem: *mut sem_t,
864864
abstime: *const ::timespec) -> ::c_int;
865+
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
866+
abstime: *const ::timespec) -> ::c_int;
865867
}
866868

867869
cfg_if! {

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ extern {
528528
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
529529
clock_id: clockid_t) -> ::c_int;
530530
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
531+
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
532+
abstime: *const ::timespec) -> ::c_int;
531533
}
532534

533535
cfg_if! {

src/unix/haiku/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@ extern {
697697
serv: *mut ::c_char,
698698
sevlen: ::size_t,
699699
flags: ::c_int) -> ::c_int;
700+
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
701+
abstime: *const ::timespec) -> ::c_int;
700702
}
701703

702704
cfg_if! {

src/unix/notbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@ extern {
848848
abstime: *const ::timespec) -> ::c_int;
849849
pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
850850
flg: ::c_int) -> ::c_int;
851+
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
852+
abstime: *const ::timespec) -> ::c_int;
851853
}
852854

853855
cfg_if! {

src/unix/solaris/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,4 +1042,6 @@ extern {
10421042
clock_id: clockid_t) -> ::c_int;
10431043
pub fn sem_timedwait(sem: *mut sem_t,
10441044
abstime: *const ::timespec) -> ::c_int;
1045+
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
1046+
abstime: *const ::timespec) -> ::c_int;
10451047
}

0 commit comments

Comments
 (0)