Browse Source

System lib: Remove unused variable from CPU load tracking

sbg
Lorenz Meier 10 years ago
parent
commit
cab6d8b770
  1. 4
      src/modules/systemlib/cpuload.c
  2. 1
      src/modules/systemlib/cpuload.h

4
src/modules/systemlib/cpuload.c

@ -78,8 +78,6 @@ void cpuload_initialize_once()
system_load.tasks[i].valid = false; system_load.tasks[i].valid = false;
} }
uint64_t now = hrt_absolute_time();
int static_tasks_count = 2; // there are at least 2 threads that should be initialized statically - "idle" and "init" int static_tasks_count = 2; // there are at least 2 threads that should be initialized statically - "idle" and "init"
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
@ -94,7 +92,6 @@ void cpuload_initialize_once()
// perform static initialization of "system" threads // perform static initialization of "system" threads
for (system_load.total_count = 0; system_load.total_count < static_tasks_count; system_load.total_count++) { for (system_load.total_count = 0; system_load.total_count < static_tasks_count; system_load.total_count++) {
system_load.tasks[system_load.total_count].start_time = now;
system_load.tasks[system_load.total_count].total_runtime = 0; system_load.tasks[system_load.total_count].total_runtime = 0;
system_load.tasks[system_load.total_count].curr_start_time = 0; system_load.tasks[system_load.total_count].curr_start_time = 0;
system_load.tasks[system_load.total_count].tcb = sched_gettcb( system_load.tasks[system_load.total_count].tcb = sched_gettcb(
@ -111,7 +108,6 @@ void sched_note_start(FAR struct tcb_s *tcb)
for (i = 1; i < CONFIG_MAX_TASKS; i++) { for (i = 1; i < CONFIG_MAX_TASKS; i++) {
if (!system_load.tasks[i].valid) { if (!system_load.tasks[i].valid) {
/* slot is available */ /* slot is available */
system_load.tasks[i].start_time = hrt_absolute_time();
system_load.tasks[i].total_runtime = 0; system_load.tasks[i].total_runtime = 0;
system_load.tasks[i].curr_start_time = 0; system_load.tasks[i].curr_start_time = 0;
system_load.tasks[i].tcb = tcb; system_load.tasks[i].tcb = tcb;

1
src/modules/systemlib/cpuload.h

@ -42,7 +42,6 @@ __BEGIN_DECLS
struct system_load_taskinfo_s { struct system_load_taskinfo_s {
uint64_t total_runtime; ///< Runtime since start (start_time - total_runtime)/(start_time - current_time) = load uint64_t total_runtime; ///< Runtime since start (start_time - total_runtime)/(start_time - current_time) = load
uint64_t curr_start_time; ///< Start time of the current scheduling slot uint64_t curr_start_time; ///< Start time of the current scheduling slot
uint64_t start_time; ///< FIRST start time of task
FAR struct tcb_s *tcb; ///< FAR struct tcb_s *tcb; ///<
bool valid; ///< Task is currently active / valid bool valid; ///< Task is currently active / valid
}; };

Loading…
Cancel
Save