File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -170,21 +170,21 @@ namespace RTT
170
170
if (thread_name_len > MAX_THREAD_NAME_SIZE) {
171
171
thread_name += thread_name_len - MAX_THREAD_NAME_SIZE;
172
172
}
173
- rv = pthread_setname_np (task->thread , thread_name);
174
- if (rv != 0 ) {
173
+ int result = pthread_setname_np (task->thread , thread_name);
174
+ if (result != 0 ) {
175
175
log (Error) << " Failed to set thread name for " << task->name << " : "
176
- << strerror (rv) << endlog ();
177
- return rv;
176
+ << strerror (result) << endlog ();
178
177
}
179
178
}
180
179
181
- if ( cpu_affinity != (unsigned )~0 ) {
182
- log (Debug) << " Setting CPU affinity to " << cpu_affinity << endlog ();
183
- if (0 != rtos_task_set_cpu_affinity (task, cpu_affinity))
184
- {
185
- log (Error) << " Failed to set CPU affinity to " << cpu_affinity << endlog ();
186
- }
187
- }
180
+ if ( cpu_affinity != (unsigned )~0 ) {
181
+ log (Debug) << " Setting CPU affinity to " << cpu_affinity << endlog ();
182
+ int result = rtos_task_set_cpu_affinity (task, cpu_affinity);
183
+ if (result != 0 ) {
184
+ log (Error) << " Failed to set CPU affinity to " << cpu_affinity << " for " << task->name << " : "
185
+ << strerror (result) << endlog ();
186
+ }
187
+ }
188
188
189
189
return rv;
190
190
}
You can’t perform that action at this time.
0 commit comments