File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed 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 {
222
222
223
223
#[ cfg( target_os = "vxworks" ) ]
224
224
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 ( ) ) } ;
235
227
debug_assert_eq ! ( res, libc:: OK ) ;
236
228
}
237
229
You can’t perform that action at this time.
0 commit comments