File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ impl Thread {
143
143
pub fn set_name ( name : & CStr ) {
144
144
unsafe {
145
145
cfg_if:: cfg_if! {
146
- if #[ cfg( target_os = "linux" ) ] {
147
- // Linux limits the allowed length of the name.
146
+ if #[ cfg( any ( target_os = "linux" , target_os = "cygwin" ) ) ] {
147
+ // Linux and Cygwin limits the allowed length of the name.
148
148
const TASK_COMM_LEN : usize = 16 ;
149
149
let name = truncate_cstr:: <{ TASK_COMM_LEN } >( name) ;
150
150
} else {
@@ -346,6 +346,7 @@ impl Drop for Thread {
346
346
target_os = "solaris" ,
347
347
target_os = "illumos" ,
348
348
target_os = "vxworks" ,
349
+ target_os = "cygwin" ,
349
350
target_vendor = "apple" ,
350
351
) ) ]
351
352
fn truncate_cstr < const MAX_WITH_NUL : usize > ( cstr : & CStr ) -> [ libc:: c_char ; MAX_WITH_NUL ] {
You can’t perform that action at this time.
0 commit comments