Skip to content

Commit

Permalink
Merge pull request rust-lang#3833 from tgross35/backport-potato
Browse files Browse the repository at this point in the history
[0.2] Backport two pull requests
  • Loading branch information
tgross35 authored Aug 16, 2024
2 parents c6606f8 + 8aeffed commit ecc37eb
Show file tree
Hide file tree
Showing 4 changed files with 21 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 @@ -1190,6 +1190,9 @@ _cpuset_destroy
_cpuset_isset
_cpuset_set
_cpuset_zero
_lwp_park
_lwp_unpark
_lwp_unpark_all
_lwp_self
abs
accept4
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/unix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ pthread_condattr_init
pthread_condattr_t
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_getspecific
pthread_join
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 @@ -2875,6 +2875,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
1 change: 1 addition & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ extern "C" {
pub fn times(buf: *mut ::tms) -> ::clock_t;

pub fn pthread_self() -> ::pthread_t;
pub fn pthread_equal(t1: ::pthread_t, t2: ::pthread_t) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "pthread_join$UNIX2003"
Expand Down

0 comments on commit ecc37eb

Please sign in to comment.