File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,10 @@ pub(crate) fn current_os_id() -> Option<u64> {
333333 // SAFETY: FFI call with no preconditions.
334334 let id: libc:: pid_t = unsafe { gettid( ) } ;
335335 Some ( id as u64 )
336+ } else if #[ cfg( target_os = "nto" ) ] {
337+ // SAFETY: FFI call with no preconditions.
338+ let id: libc:: pid_t = unsafe { libc:: gettid( ) } ;
339+ Some ( id as u64 )
336340 } else if #[ cfg( target_os = "openbsd" ) ] {
337341 // SAFETY: FFI call with no preconditions.
338342 let id: libc:: pid_t = unsafe { libc:: getthrid( ) } ;
@@ -345,13 +349,6 @@ pub(crate) fn current_os_id() -> Option<u64> {
345349 // SAFETY: FFI call with no preconditions.
346350 let id: libc:: lwpid_t = unsafe { libc:: _lwp_self( ) } ;
347351 Some ( id as u64 )
348- } else if #[ cfg( all( target_os = "nto" , not( target_env = "nto70" ) ) ) ] {
349- // Neutrino has `gettid` since 7.1. 7.0 is our oldest supported version so exclude it.
350- // SAFETY: FFI call with no preconditions.
351- let id: libc:: pid_t = unsafe { libc:: gettid( ) } ;
352- Some ( id as u64 )
353- } else if #[ cfg( target_os = "nto" ) ] {
354- None
355352 } else if #[ cfg( target_vendor = "apple" ) ] {
356353 // Apple allows querying arbitrary thread IDs, `thread=NULL` queries the current thread.
357354 let mut id = 0u64 ;
You can’t perform that action at this time.
0 commit comments