File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -222,16 +222,8 @@ impl Thread {
222222
223223 #[ cfg( target_os = "vxworks" ) ]
224224 pub fn set_name ( name : & CStr ) {
225- // FIXME(libc): adding real STATUS, ERROR type eventually.
226- unsafe extern "C" {
227- fn taskNameSet ( task_id : libc:: TASK_ID , task_name : * mut libc:: c_char ) -> libc:: c_int ;
228- }
229-
230- // VX_TASK_NAME_LEN is 31 in VxWorks 7.
231- const VX_TASK_NAME_LEN : usize = 31 ;
232-
233- let mut name = truncate_cstr :: < { VX_TASK_NAME_LEN } > ( name) ;
234- let res = unsafe { taskNameSet ( libc:: taskIdSelf ( ) , name. as_mut_ptr ( ) ) } ;
225+ let mut name = truncate_cstr :: < { libc:: VX_TASK_RENAME_LENGTH - 1 } > ( name) ;
226+ let res = unsafe { libc:: taskNameSet ( libc:: taskIdSelf ( ) , name. as_mut_ptr ( ) ) } ;
235227 debug_assert_eq ! ( res, libc:: OK ) ;
236228 }
237229
You can’t perform that action at this time.
0 commit comments