Skip to content

Commit

Permalink
add more pthread_attr functions and related constants:
Browse files Browse the repository at this point in the history
pthread_attr_getinheritsched
pthread_attr_setinheritsched
pthread_attr_getschedpolicy
pthread_attr_setschedpolicy
pthread_attr_getschedparam
pthread_attr_setschedparam
PTHREAD_INHERIT_SCHED
PTHREAD_EXPLICIT_SCHED
  • Loading branch information
Ncerzzk committed Nov 17, 2023
1 parent 1ab1874 commit a6af715
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -1986,6 +1986,8 @@ PTHREAD_PRIO_INHERIT
PTHREAD_PRIO_PROTECT
PTHREAD_PROCESS_PRIVATE
PTHREAD_PROCESS_SHARED
PTHREAD_INHERIT_SCHED
PTHREAD_EXPLICIT_SCHED
PTHREAD_STACK_MIN
PTHREAD_ONCE_INIT
PTRACE_ATTACH
Expand Down Expand Up @@ -3655,6 +3657,12 @@ priority_t
pread64
preadv
pthread_attr_getguardsize
pthread_attr_getinheritsched
pthread_attr_setinheritsched
pthread_attr_getschedpolicy
pthread_attr_setschedpolicy
pthread_attr_getschedparam
pthread_attr_setschedparam
pthread_attr_getstack
pthread_attr_setguardsize
pthread_cancel
Expand Down
8 changes: 8 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -2000,6 +2000,8 @@ pub const PTHREAD_PRIO_INHERIT: ::c_int = 1;
pub const PTHREAD_PRIO_PROTECT: ::c_int = 2;
pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
pub const PTHREAD_INHERIT_SCHED: ::c_int = 0;
pub const PTHREAD_EXPLICIT_SCHED: ::c_int = 1;
pub const __SIZEOF_PTHREAD_COND_T: usize = 48;

pub const RENAME_NOREPLACE: ::c_uint = 1;
Expand Down Expand Up @@ -5179,6 +5181,12 @@ extern "C" {
guardsize: *mut ::size_t,
) -> ::c_int;
pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int;
pub fn pthread_attr_getinheritsched (attr: *const ::pthread_attr_t, inheritsched: *mut ::c_int) -> ::c_int;
pub fn pthread_attr_setinheritsched (attr: *mut ::pthread_attr_t, inheritsched: ::c_int) -> ::c_int;
pub fn pthread_attr_getschedpolicy (attr: *const ::pthread_attr_t, policy: *mut ::c_int) -> ::c_int;
pub fn pthread_attr_setschedpolicy (attr: *mut ::pthread_attr_t, policy: ::c_int) -> ::c_int;
pub fn pthread_attr_getschedparam(attr: *const ::pthread_attr_t, param: *mut ::sched_param) -> ::c_int;
pub fn pthread_attr_setschedparam(attr: *mut ::pthread_attr_t, param: *const ::sched_param) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
pub fn pthread_condattr_getpshared(
Expand Down

0 comments on commit a6af715

Please sign in to comment.