mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 19:57:35 +08:00
system_load:Track Dynamic PID hash
This commit is contained in:
committed by
Daniel Agar
parent
e6d9c2b734
commit
bb913ae11a
@@ -290,7 +290,7 @@ void LoadMon::stack_usage()
|
||||
}
|
||||
|
||||
// Continue after last checked task next cycle
|
||||
_stack_task_index = (_stack_task_index + 1) % CONFIG_MAX_TASKS;
|
||||
_stack_task_index = (_stack_task_index + 1) % CONFIG_FS_PROCFS_MAX_TASKS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ void watchdog_initialize(const pid_t pid_logger_main, const pthread_t writer_thr
|
||||
|
||||
sched_lock(); // need to lock the tcb access
|
||||
|
||||
for (int i = 0; i < CONFIG_MAX_TASKS; i++) {
|
||||
for (int i = 0; i < CONFIG_FS_PROCFS_MAX_TASKS; i++) {
|
||||
if (system_load.tasks[i].valid) {
|
||||
if (system_load.tasks[i].tcb->pid == pid_logger_writer) {
|
||||
watchdog_data.logger_writer_task_index = i;
|
||||
|
||||
Reference in New Issue
Block a user