Skip to content

Commit 1183d54

Browse files
devnexentgross35
authored andcommitted
netbsd adding _lwp_park api.
(backport <#3721>) (cherry picked from commit 4769aaa)
1 parent be5dd84 commit 1183d54

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

libc-test/semver/netbsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,9 @@ _cpuset_destroy
11901190
_cpuset_isset
11911191
_cpuset_set
11921192
_cpuset_zero
1193+
_lwp_park
1194+
_lwp_unpark
1195+
_lwp_unpark_all
11931196
_lwp_self
11941197
abs
11951198
accept4

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,6 +2875,22 @@ extern "C" {
28752875
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
28762876

28772877
pub fn reboot(mode: ::c_int, bootstr: *mut ::c_char) -> ::c_int;
2878+
2879+
#[link_name = "___lwp_park60"]
2880+
pub fn _lwp_park(
2881+
clock: ::clockid_t,
2882+
flags: ::c_int,
2883+
ts: *const ::timespec,
2884+
unpark: ::lwpid_t,
2885+
hint: *const ::c_void,
2886+
unparkhint: *mut ::c_void,
2887+
) -> ::c_int;
2888+
pub fn _lwp_unpark(lwp: ::lwpid_t, hint: *const ::c_void) -> ::c_int;
2889+
pub fn _lwp_unpark_all(
2890+
targets: *const ::lwpid_t,
2891+
ntargets: ::size_t,
2892+
hint: *const ::c_void,
2893+
) -> ::c_int;
28782894
}
28792895

28802896
#[link(name = "rt")]

0 commit comments

Comments
 (0)