File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/src/sys/pal/unix/thread.rs b/src/sys/pal/unix/thread.rs
2
+ index 2af6382..acf3ecb 100644
3
+ --- a/src/sys/pal/unix/thread.rs
4
+ +++ b/src/sys/pal/unix/thread.rs
5
+ @@ -225,7 +225,9 @@ pub fn set_name(_name: &CStr) {
6
+ // Newlib, Emscripten, and VxWorks have no way to set a thread name.
7
+ }
8
+
9
+ - #[cfg(target_os = "linux")]
10
+ + // Qualcomm fork of musl doesn't have pthread_getname_np.
11
+ + // https://github.com/quic/musl/blob/7243e0d3a9d7e0f08d21fc194a05749e0bb26725/include/pthread.h
12
+ + #[cfg(all(target_os = "linux", not(target_arch = "hexagon")))]
13
+ pub fn get_name() -> Option<CString> {
14
+ const TASK_COMM_LEN: usize = 16;
15
+ let mut name = vec![0u8; TASK_COMM_LEN];
16
+ @@ -253,7 +255,7 @@ pub fn get_name() -> Option<CString> {
17
+ }
18
+
19
+ #[cfg(not(any(
20
+ - target_os = "linux",
21
+ + all(target_os = "linux", not(target_arch = "hexagon")),
22
+ target_os = "macos",
23
+ target_os = "ios",
24
+ target_os = "tvos",
You can’t perform that action at this time.
0 commit comments