Skip to content
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

Add a couple pthread function definitions, get_sched and backtrace for musl #860

Closed
wants to merge 1 commit into from
Closed
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
20 changes: 20 additions & 0 deletions src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,29 @@ pub const SO_BUSY_POLL: ::c_int = 46;

extern {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
pub fn backtrace(buf: *mut *mut ::c_void,
sz: ::c_int) -> ::c_int;
pub fn ptrace(request: ::c_int, ...) -> ::c_long;

pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
cpusetsize: ::size_t,
cpuset: *mut ::cpu_set_t) -> ::c_int;
pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
cpusetsize: ::size_t,
cpuset: *const ::cpu_set_t) -> ::c_int;
pub fn pthread_getaffinity_np(thread: ::pthread_t,
cpusetsize: ::size_t,
cpuset: *mut ::cpu_set_t) -> ::c_int;
pub fn pthread_setaffinity_np(thread: ::pthread_t,
cpusetsize: ::size_t,
cpuset: *const ::cpu_set_t) -> ::c_int;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
pub fn pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t,
val: *mut ::c_int) -> ::c_int;
pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t,
val: ::c_int) -> ::c_int;
pub fn sched_getcpu() -> ::c_int;
}

cfg_if! {
Expand Down