Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LoadMon.cpp: Add px4_ prefix to enter/exit_critical() calls #826

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/modules/load_mon/LoadMon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ void LoadMon::cpuload()
#elif defined(__PX4_NUTTX)

if (_last_idle_time == 0) {
irqstate_t irqstate = enter_critical_section();
irqstate_t irqstate = px4_enter_critical_section();
// Just get the time in the first iteration */
_last_idle_time = system_load.tasks[0].total_runtime;
_last_idle_time_sample = system_load.tasks[0].curr_start_time;
leave_critical_section(irqstate);
px4_leave_critical_section(irqstate);
return;
}

irqstate_t irqstate = enter_critical_section();
irqstate_t irqstate = px4_enter_critical_section();
const hrt_abstime now = system_load.tasks[0].curr_start_time;
const hrt_abstime total_runtime = system_load.tasks[0].total_runtime;
leave_critical_section(irqstate);
px4_leave_critical_section(irqstate);

if ((now == _last_idle_time_sample) || (total_runtime == _last_idle_time)) {
return;
Expand Down
Loading