Browse Source

use_cnt field for CPU

Serj Kalichev 6 years ago
parent
commit
c92b3475b3
2 changed files with 2 additions and 0 deletions
  1. 1 0
      cpu.c
  2. 1 0
      cpu.h

+ 1 - 0
cpu.c

@@ -45,6 +45,7 @@ static cpu_t * cpu_new(unsigned int id)
 	cpus_init(new->cpumask);
 	cpus_clear(new->cpumask);
 	cpu_set(new->id, new->cpumask);
+	new->use_cnt = 0;
 
 	return new;
 }

+ 1 - 0
cpu.h

@@ -14,6 +14,7 @@ struct cpu_s {
 	float old_load; /* Previous CPU load in percents. */
 	float load; /* Current CPU load in percents. */
 	lub_list_t *irqs; /* List of IRQs belong to this CPU. */
+	unsigned int use_cnt; /* How many IRQs were moved to this CPU on current tact */
 };
 typedef struct cpu_s cpu_t;