Skip to content

Add pthread_main_np to FreeBSD-like and _lwp_self to NetBSD #1533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ extern "C" {
attr: *mut pthread_condattr_t,
pshared: ::c_int,
) -> ::c_int;
pub fn pthread_main_np() -> ::c_int;
pub fn pthread_mutex_timedlock(
lock: *mut pthread_mutex_t,
abstime: *const ::timespec,
Expand Down
3 changes: 3 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub type idtype_t = ::c_int;
pub type mqd_t = ::c_int;
type __pthread_spin_t = __cpu_simple_lock_nv_t;
pub type vm_size_t = ::uintptr_t;
pub type lwpid_t = ::c_uint;

impl siginfo_t {
pub unsafe fn si_value(&self) -> ::sigval {
Expand Down Expand Up @@ -1714,6 +1715,8 @@ extern "C" {
flags: ::c_int,
timeout: *mut ::timespec,
) -> ::c_int;

pub fn _lwp_self() -> lwpid_t;
}

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