Rename _SysIdleElapsedTicks to _sys_idle_elapsed_ticks

Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4e5c9419fe0ccbc4b2990b96fc95c697decc18e0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
diff --git a/arch/arm/timer/systick.c b/arch/arm/timer/systick.c
index 56a9bfb..4fc3673 100644
--- a/arch/arm/timer/systick.c
+++ b/arch/arm/timer/systick.c
@@ -116,7 +116,7 @@
 #endif /* CONFIG_ADVANCED_POWER_MANAGEMENT */
 
 #ifdef CONFIG_TICKLESS_IDLE
-extern int32_t _SysIdleElapsedTicks;
+extern int32_t _sys_idle_elapsed_ticks;
 #endif /* CONFIG_TICKLESS_IDLE */
 
 /* locals */
@@ -315,7 +315,7 @@
 	if (idleMode == IDLE_TICKLESS) {
 		/* tickless idle completed without interruption */
 		idleMode = IDLE_NOT_TICKLESS;
-		_SysIdleElapsedTicks =
+		_sys_idle_elapsed_ticks =
 			idleOrigTicks + 1; /* actual # of idle ticks */
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	} else {
@@ -325,7 +325,7 @@
 		 * Also, if not in tickless mode, _SysIdleElpasedTicks will be
 		 * 0.
 		 */
-		_SysIdleElapsedTicks++;
+		_sys_idle_elapsed_ticks++;
 
 		/*
 		 * If we transition from 0 elapsed ticks to 1 we need to
@@ -334,13 +334,13 @@
 		 * _timer_idle_exit.
 		 */
 
-		if (_SysIdleElapsedTicks == 1) {
+		if (_sys_idle_elapsed_ticks == 1) {
 			nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 		}
 	}
 
 	/* accumulate total counter value */
-	accumulatedCount += defaultLoadVal * _SysIdleElapsedTicks;
+	accumulatedCount += defaultLoadVal * _sys_idle_elapsed_ticks;
 #else  /* !CONFIG_TICKLESS_IDLE */
 	/*
 	 * No tickless idle:
@@ -544,7 +544,7 @@
 * the timer out of idle mode and generating an interrupt at the next
 * tick interval.  It is expected that interrupts have been disabled.
 *
-* Note that in this routine, _SysIdleElapsedTicks must be zero because the
+* Note that in this routine, _sys_idle_elapsed_ticks must be zero because the
 * ticker has done its work and consumed all the ticks. This has to be true
 * otherwise idle mode wouldn't have been entered in the first place.
 *
@@ -584,9 +584,9 @@
 		 * guaranteed
 		 * that the timer ISR will execute before the tick event is
 		 * serviced,
-		 * so _SysIdleElapsedTicks is adjusted to account for it.
+		 * so _sys_idle_elapsed_ticks is adjusted to account for it.
 		 */
-		_SysIdleElapsedTicks = idleOrigTicks - 1;
+		_sys_idle_elapsed_ticks = idleOrigTicks - 1;
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	} else {
 		uint32_t elapsed;   /* elapsed "counter time" */
@@ -615,9 +615,9 @@
 			sysTickReloadSet(remaining);
 		}
 
-		_SysIdleElapsedTicks = elapsed / defaultLoadVal;
+		_sys_idle_elapsed_ticks = elapsed / defaultLoadVal;
 
-		if (_SysIdleElapsedTicks) {
+		if (_sys_idle_elapsed_ticks) {
 			/* Announce elapsed ticks to the microkernel */
 			nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 		}
diff --git a/arch/x86/timer/hpet.c b/arch/x86/timer/hpet.c
index 7807d0e..600fd2b 100644
--- a/arch/x86/timer/hpet.c
+++ b/arch/x86/timer/hpet.c
@@ -217,7 +217,7 @@
 
 /* additional globals, locals, and forward declarations */
 
-extern int32_t _SysIdleElapsedTicks;
+extern int32_t _sys_idle_elapsed_ticks;
 
 static uint32_t __noinit counterLoadValue; /* main counter units
 							    per system tick */
@@ -324,7 +324,7 @@
 	 * tickless mode,
 	 * _SysIdleElpasedTicks will be 0.
 	 */
-	_SysIdleElapsedTicks++;
+	_sys_idle_elapsed_ticks++;
 
 	/*
 	 * If we transistion from 0 elapsed ticks to 1 we need to announce the
@@ -334,7 +334,7 @@
 	 * _timer_idle_exit
 	 */
 
-	if (_SysIdleElapsedTicks == 1) {
+	if (_sys_idle_elapsed_ticks == 1) {
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	}
 
@@ -431,7 +431,7 @@
 		 * interrupt handler runs (which is unlikely, but could happen)
 		 */
 
-		_SysIdleElapsedTicks = programmedTicks - 1;
+		_sys_idle_elapsed_ticks = programmedTicks - 1;
 
 		/*
 		 * Announce elapsed ticks to the microkernel. Note we are
@@ -459,7 +459,7 @@
 	 * note: a premature tick declaration has no significant impact on
 	 * the microkernel, which gets informed of the correct number of elapsed
 	 * ticks when the following tick finally occurs; however, any ISRs that
-	 * access _SysIdleElapsedTicks to determine the current time may be
+	 * access _sys_idle_elapsed_ticks to determine the current time may be
 	 *misled
 	 * during the (very brief) interval before the tick-in-progress finishes
 	 * and the following tick begins
@@ -487,9 +487,9 @@
 	 * expires and the timer interrupt handler runs
 	 */
 
-	_SysIdleElapsedTicks = elapsedTicks;
+	_sys_idle_elapsed_ticks = elapsedTicks;
 
-	if (_SysIdleElapsedTicks) {
+	if (_sys_idle_elapsed_ticks) {
 		/* Announce elapsed ticks to the microkernel */
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	}
diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c
index e74ac6a..9041209 100644
--- a/arch/x86/timer/loApicTimer.c
+++ b/arch/x86/timer/loApicTimer.c
@@ -115,7 +115,7 @@
 /* globals */
 
 #if defined(TIMER_SUPPORTS_TICKLESS)
-extern int32_t _SysIdleElapsedTicks;
+extern int32_t _sys_idle_elapsed_ticks;
 #endif /* TIMER_SUPPORTS_TICKLESS */
 
 /* locals */
@@ -319,10 +319,10 @@
 	 * tickless mode,
 	 * _SysIdleElpasedTicks will be 0.
 	 */
-	_SysIdleElapsedTicks++;
+	_sys_idle_elapsed_ticks++;
 
 	/* accumulate total counter value */
-	accumulatedCount += counterLoadVal * _SysIdleElapsedTicks;
+	accumulatedCount += counterLoadVal * _sys_idle_elapsed_ticks;
 
 	/*
 	 * If we transistion from 0 elapsed ticks to 1 we need to announce the
@@ -330,7 +330,7 @@
 	 * covered by _timer_idle_exit
 	 */
 
-	if (_SysIdleElapsedTicks == 1) {
+	if (_sys_idle_elapsed_ticks == 1) {
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	}
 
@@ -519,7 +519,7 @@
 		 * mode */
 		_loApicTimerPeriodic();
 		_loApicTimerSetCount(counterLoadVal);
-		_SysIdleElapsedTicks = _IdleOrigTicks - 1;
+		_sys_idle_elapsed_ticks = _IdleOrigTicks - 1;
 		_TimerMode = TIMER_MODE_PERIODIC;
 		/*
 		 * Announce elapsed ticks to the microkernel. Note we are
@@ -548,9 +548,9 @@
 			_loApicTimerSetCount(remaining);
 		}
 
-		_SysIdleElapsedTicks = elapsed / counterLoadVal;
+		_sys_idle_elapsed_ticks = elapsed / counterLoadVal;
 
-		if (_SysIdleElapsedTicks) {
+		if (_sys_idle_elapsed_ticks) {
 			/* Announce elapsed ticks to the microkernel */
 			nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 		}
diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c
index f23fdab..646d2fd 100644
--- a/drivers/timer/i8253.c
+++ b/drivers/timer/i8253.c
@@ -118,7 +118,7 @@
 /* globals */
 
 #if defined(TIMER_SUPPORTS_TICKLESS)
-extern int32_t _SysIdleElapsedTicks;
+extern int32_t _sys_idle_elapsed_ticks;
 #endif
 
 /* locals */
@@ -288,7 +288,7 @@
 	 * tickless mode,
 	 * _SysIdleElpasedTicks will be 0.
 	 */
-	_SysIdleElapsedTicks++;
+	_sys_idle_elapsed_ticks++;
 
 	/*
 	 * If we transistion from 0 elapsed ticks to 1 we need to announce the
@@ -296,12 +296,12 @@
 	 * covered by _timer_idle_exit
 	 */
 
-	if (_SysIdleElapsedTicks == 1) {
+	if (_sys_idle_elapsed_ticks == 1) {
 		nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 	}
 
 	/* accumulate total counter value */
-	accumulatedCount += counterLoadVal * _SysIdleElapsedTicks;
+	accumulatedCount += counterLoadVal * _sys_idle_elapsed_ticks;
 
 #else
 #if defined(CONFIG_MICROKERNEL)
@@ -468,7 +468,7 @@
 		/* Timer expired. Place back in periodic mode */
 		_i8253CounterPeriodic(counterLoadVal);
 		_TimerMode = TIMER_MODE_PERIODIC;
-		_SysIdleElapsedTicks = _IdleOrigTicks - 1;
+		_sys_idle_elapsed_ticks = _IdleOrigTicks - 1;
 		/*
 		 * Announce elapsed ticks to the microkernel. Note we are
 		 * guaranteed
@@ -495,9 +495,9 @@
 			_i8253CounterOneShot(remaining);
 		}
 
-		_SysIdleElapsedTicks = elapsed / counterLoadVal;
+		_sys_idle_elapsed_ticks = elapsed / counterLoadVal;
 
-		if (_SysIdleElapsedTicks) {
+		if (_sys_idle_elapsed_ticks) {
 			/* Announce elapsed ticks to the microkernel */
 			nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
 		}
diff --git a/kernel/microkernel/timer/ticker.c b/kernel/microkernel/timer/ticker.c
index e2cd30e..35e7477 100644
--- a/kernel/microkernel/timer/ticker.c
+++ b/kernel/microkernel/timer/ticker.c
@@ -57,7 +57,7 @@
 
 #ifdef CONFIG_TICKLESS_IDLE
 /* Number of ticks elapsed that have not been announced to the microkernel */
-int32_t _SysIdleElapsedTicks = 0; /* Initial value must be 0 */
+int32_t _sys_idle_elapsed_ticks = 0; /* Initial value must be 0 */
 #endif
 
 /* units: us/tick */
@@ -221,8 +221,8 @@
 	int key;
 
 	key = irq_lock();
-	ticks = _SysIdleElapsedTicks;
-	_SysIdleElapsedTicks = 0;
+	ticks = _sys_idle_elapsed_ticks;
+	_sys_idle_elapsed_ticks = 0;
 	irq_unlock(key);
 	return ticks;
 #else