Skip to content
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
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5090,6 +5090,8 @@ fn test_linux(target: &str) {
"posix_spawn_file_actions_addclosefrom_np" if gnu && sparc64 => true,
// Needs glibc 2.35 or later.
"posix_spawn_file_actions_addtcsetpgrp_np" if gnu && sparc64 => true,
// Needs glibc 2.42 or later.
"pthread_gettid_np" if gnu && versions.glibc.unwrap() < (2, 42) => true,

// FIXME(linux): Deprecated since glibc 2.30. Remove fn once upstream does.
"sysctl" if gnu => true,
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3829,6 +3829,7 @@ pthread_getattr_np
pthread_getcpuclockid
pthread_getschedparam
pthread_getspecific
pthread_gettid_np
pthread_join
pthread_key_create
pthread_key_delete
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ process_vm_readv
process_vm_writev
pthread_attr_getaffinity_np
pthread_attr_setaffinity_np
pthread_gettid_np
pthread_rwlockattr_getkind_np
pthread_rwlockattr_getpshared
pthread_rwlockattr_setkind_np
Expand Down
1 change: 1 addition & 0 deletions src/new/bionic_libc/pthread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pub use crate::new::common::linux_like::pthread::{
pthread_getattr_np,
pthread_gettid_np,
pthread_setname_np,
};
pub use crate::new::common::posix::pthread::{
Expand Down
3 changes: 3 additions & 0 deletions src/new/common/linux_like/pthread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ extern "C" {
#[cfg(target_os = "linux")]
pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int;

#[cfg(any(target_os = "android", all(target_os = "linux", target_env = "gnu")))]
pub fn pthread_gettid_np(thread: crate::pthread_t) -> crate::pid_t;

#[cfg(any(target_os = "linux", target_os = "l4re"))]
pub fn pthread_setaffinity_np(
thread: crate::pthread_t,
Expand Down
1 change: 1 addition & 0 deletions src/new/glibc/sysdeps/nptl/pthread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub use crate::new::common::linux_like::pthread::{
pthread_getaffinity_np,
pthread_getattr_np,
pthread_getname_np,
pthread_gettid_np,
pthread_setaffinity_np,
pthread_setname_np,
};
Expand Down