File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -225,13 +225,19 @@ impl Thread {
225
225
// Newlib, Emscripten, and VxWorks have no way to set a thread name.
226
226
}
227
227
228
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" , target_os = "netbsd" , ) ) ]
228
+ #[ cfg( any(
229
+ target_os = "linux" ,
230
+ target_os = "freebsd" ,
231
+ target_os = "netbsd" ,
232
+ target_os = "solaris" ,
233
+ target_os = "illumos"
234
+ ) ) ]
229
235
pub fn get_name ( ) -> Option < CString > {
230
236
#[ cfg( target_os = "linux" ) ]
231
237
const TASK_COMM_LEN : usize = 16 ;
232
238
#[ cfg( target_os = "freebsd" ) ]
233
239
const TASK_COMM_LEN : usize = libc:: MAXCOMLEN + 1 ;
234
- #[ cfg( target_os = "netbsd" ) ]
240
+ #[ cfg( any ( target_os = "netbsd" , target_os = "solaris" , target_os = "illumos" ) ) ]
235
241
const TASK_COMM_LEN : usize = 32 ;
236
242
let mut name = vec ! [ 0u8 ; TASK_COMM_LEN ] ;
237
243
let res = unsafe {
@@ -282,7 +288,9 @@ impl Thread {
282
288
target_os = "ios" ,
283
289
target_os = "tvos" ,
284
290
target_os = "watchos" ,
285
- target_os = "haiku"
291
+ target_os = "haiku" ,
292
+ target_os = "solaris" ,
293
+ target_os = "illumos"
286
294
) ) ) ]
287
295
pub fn get_name ( ) -> Option < CString > {
288
296
None
You can’t perform that action at this time.
0 commit comments