Skip to content

Commit

Permalink
LoadMon.cpp: Add px4_ prefix to enter/exit_critical() calls
Browse files Browse the repository at this point in the history
Just for consistency, use the prefix for all calls.
  • Loading branch information
pussuw committed Nov 28, 2024
1 parent 1a75bdb commit f0f87e4
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit f0f87e4

Please # to comment.