File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,12 @@ impl Thread {
130130 }
131131 }
132132
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+ ) ) ]
134139 pub fn set_name ( name : & CStr ) {
135140 unsafe {
136141 cfg_if:: cfg_if! {
@@ -139,7 +144,7 @@ impl Thread {
139144 const TASK_COMM_LEN : usize = 16 ;
140145 let name = truncate_cstr:: <{ TASK_COMM_LEN } >( name) ;
141146 } else {
142- // FreeBSD and DragonFly BSD do not enforce length limits.
147+ // FreeBSD, DragonFly, FreeBSD and NuttX do not enforce length limits.
143148 }
144149 } ;
145150 // Available since glibc 2.12, musl 1.1.16, and uClibc 1.0.20 for Linux,
@@ -150,7 +155,7 @@ impl Thread {
150155 }
151156 }
152157
153- #[ cfg( any ( target_os = "openbsd" , target_os = "nuttx" ) ) ]
158+ #[ cfg( target_os = "openbsd" ) ]
154159 pub fn set_name ( name : & CStr ) {
155160 unsafe {
156161 libc:: pthread_set_name_np ( libc:: pthread_self ( ) , name. as_ptr ( ) ) ;
You can’t perform that action at this time.
0 commit comments