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 pthread_mutexattr_setprotocol and pthread_mutexattr_getprotocol on Linux #2731

Merged
merged 1 commit into from Apr 24, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -1653,6 +1653,9 @@ PTHREAD_CREATE_DETACHED
PTHREAD_CREATE_JOINABLE
PTHREAD_MUTEX_DEFAULT
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_PRIO_NONE
PTHREAD_PRIO_INHERIT
PTHREAD_PRIO_PROTECT
PTHREAD_PROCESS_PRIVATE
PTHREAD_PROCESS_SHARED
PTHREAD_STACK_MIN
Expand Down Expand Up @@ -2951,7 +2954,9 @@ pthread_getschedparam
pthread_kill
pthread_mutex_consistent
pthread_mutex_timedlock
pthread_mutexattr_getprotocol
pthread_mutexattr_getpshared
pthread_mutexattr_setprotocol
pthread_mutexattr_setpshared
pthread_mutexattr_getrobust
pthread_mutexattr_setrobust
Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -1519,6 +1519,9 @@ pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
pub const PTHREAD_MUTEX_STALLED: ::c_int = 0;
pub const PTHREAD_MUTEX_ROBUST: ::c_int = 1;
pub const PTHREAD_PRIO_NONE: ::c_int = 0;
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 __SIZEOF_PTHREAD_COND_T: usize = 48;
Expand Down Expand Up @@ -3785,6 +3788,14 @@ extern "C" {
timeout: *const ::timespec,
sigmask: *const sigset_t,
) -> ::c_int;
pub fn pthread_mutexattr_getprotocol(
attr: *const pthread_mutexattr_t,
protocol: *mut ::c_int,
) -> ::c_int;
pub fn pthread_mutexattr_setprotocol(
attr: *mut pthread_mutexattr_t,
protocol: ::c_int,
) -> ::c_int;
pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> ::c_int;
pub fn pthread_mutex_timedlock(
lock: *mut pthread_mutex_t,
Expand Down