8
8
use crate :: backend:: c;
9
9
#[ cfg( target_arch = "x86" ) ]
10
10
use crate :: backend:: conv:: by_mut;
11
+ #[ cfg( target_arch = "x86_64" ) ]
12
+ use crate :: backend:: conv:: c_uint;
11
13
use crate :: backend:: conv:: {
12
- by_ref, c_int, c_uint , ret, ret_c_int, ret_c_int_infallible, ret_error, ret_infallible,
13
- ret_void_star , size_of, zero,
14
+ by_ref, c_int, ret, ret_c_int, ret_c_int_infallible, ret_error, ret_infallible, ret_void_star ,
15
+ size_of, zero,
14
16
} ;
15
17
#[ cfg( feature = "fs" ) ]
16
18
use crate :: fd:: BorrowedFd ;
@@ -30,7 +32,6 @@ use linux_raw_sys::general::__kernel_old_timespec;
30
32
use linux_raw_sys:: general:: kernel_sigset_t;
31
33
#[ cfg( target_arch = "x86_64" ) ]
32
34
use linux_raw_sys:: general:: ARCH_SET_FS ;
33
- use linux_raw_sys:: prctl:: PR_SET_NAME ;
34
35
35
36
#[ inline]
36
37
pub ( crate ) unsafe fn fork ( ) -> io:: Result < Fork > {
@@ -139,18 +140,6 @@ pub(crate) mod tls {
139
140
Pid :: from_raw_unchecked ( tid)
140
141
}
141
142
142
- #[ inline]
143
- pub ( crate ) unsafe fn set_thread_name ( name : & CStr ) -> io:: Result < ( ) > {
144
- ret ( syscall_readonly ! (
145
- __NR_prctl,
146
- c_uint( PR_SET_NAME ) ,
147
- name,
148
- zero( ) ,
149
- zero( ) ,
150
- zero( )
151
- ) )
152
- }
153
-
154
143
#[ inline]
155
144
pub ( crate ) fn exit_thread ( code : c:: c_int ) -> ! {
156
145
unsafe { syscall_noreturn ! ( __NR_exit, c_int( code) ) }
0 commit comments