Skip to content
Snippets Groups Projects
Commit 794c7a5a authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

load_mon: fix tasks index & fds_free initialization

Makes sure that if CONFIG_NFILE_DESCRIPTORS == 0, no warning is printed.
parent eb43b86a
No related branches found
No related tags found
No related merge requests found
......@@ -264,7 +264,7 @@ void LoadMon::_stack_usage()
for (int i = _stack_task_index; i < _stack_task_index + num_tasks_per_cycle; i++) {
task_index = i % CONFIG_MAX_TASKS;
unsigned stack_free = 0;
unsigned fds_free = 0;
unsigned fds_free = FDS_LOW_WARNING_THRESHOLD + 1;
bool checked_task = false;
perf_begin(_stack_perf);
......@@ -278,7 +278,7 @@ void LoadMon::_stack_usage()
task_stack_info_s::MAX_REPORT_TASK_NAME_LEN);
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct task_group_s *group = system_load.tasks[i].tcb->group;
FAR struct task_group_s *group = system_load.tasks[task_index].tcb->group;
unsigned tcb_num_used_fds = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment