File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,12 @@ impl Thread {
130
130
}
131
131
}
132
132
133
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" , target_os = "dragonfly" ) ) ]
133
+ #[ cfg( any(
134
+ target_os = "linux" ,
135
+ target_os = "freebsd" ,
136
+ target_os = "dragonfly" ,
137
+ target_os = "nuttx"
138
+ ) ) ]
134
139
pub fn set_name ( name : & CStr ) {
135
140
unsafe {
136
141
cfg_if:: cfg_if! {
@@ -139,7 +144,7 @@ impl Thread {
139
144
const TASK_COMM_LEN : usize = 16 ;
140
145
let name = truncate_cstr:: <{ TASK_COMM_LEN } >( name) ;
141
146
} else {
142
- // FreeBSD and DragonFly BSD do not enforce length limits.
147
+ // FreeBSD, DragonFly, FreeBSD and NuttX do not enforce length limits.
143
148
}
144
149
} ;
145
150
// Available since glibc 2.12, musl 1.1.16, and uClibc 1.0.20 for Linux,
@@ -150,7 +155,7 @@ impl Thread {
150
155
}
151
156
}
152
157
153
- #[ cfg( any ( target_os = "openbsd" , target_os = "nuttx" ) ) ]
158
+ #[ cfg( target_os = "openbsd" ) ]
154
159
pub fn set_name ( name : & CStr ) {
155
160
unsafe {
156
161
libc:: pthread_set_name_np ( libc:: pthread_self ( ) , name. as_ptr ( ) ) ;
You can’t perform that action at this time.
0 commit comments