Skip to content

Commit

Permalink
Merge pull request #3721 from devnexen/netbsd_lwp_unpark
Browse files Browse the repository at this point in the history
netbsd adding _lwp_park api.
  • Loading branch information
tgross35 authored Aug 13, 2024
2 parents b496aac + 4769aaa commit f5d998e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,9 @@ _cpuset_destroy
_cpuset_isset
_cpuset_set
_cpuset_zero
_lwp_park
_lwp_unpark
_lwp_unpark_all
_lwp_self
abs
accept4
Expand Down
16 changes: 16 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2862,6 +2862,22 @@ extern "C" {
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;

pub fn reboot(mode: ::c_int, bootstr: *mut ::c_char) -> ::c_int;

#[link_name = "___lwp_park60"]
pub fn _lwp_park(
clock: ::clockid_t,
flags: ::c_int,
ts: *const ::timespec,
unpark: ::lwpid_t,
hint: *const ::c_void,
unparkhint: *mut ::c_void,
) -> ::c_int;
pub fn _lwp_unpark(lwp: ::lwpid_t, hint: *const ::c_void) -> ::c_int;
pub fn _lwp_unpark_all(
targets: *const ::lwpid_t,
ntargets: ::size_t,
hint: *const ::c_void,
) -> ::c_int;
}

#[link(name = "rt")]
Expand Down

0 comments on commit f5d998e

Please sign in to comment.