Rename SliceTime to slice_time

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: I5538ce1bb13da14b0d4778264f9d36bf246c497a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-27 10:28:36 -05:00 committed by Anas Nashif
commit ee96425b55

View file

@ -50,7 +50,7 @@ This module implements the microkernel's tick event handler.
#ifdef CONFIG_TIMESLICING
static int32_t slice_count = (int32_t)0;
static int32_t SliceTime = (int32_t)CONFIG_TIMESLICE_SIZE;
static int32_t slice_time = (int32_t)CONFIG_TIMESLICE_SIZE;
static kpriority_t SlicePrio =
(kpriority_t)CONFIG_TIMESLICE_PRIORITY;
#endif /* CONFIG_TIMESLICING */
@ -187,8 +187,8 @@ static inline int _TlDebugUpdate(int32_t ticks)
static inline void _TimeSliceUpdate(void)
{
#ifdef CONFIG_TIMESLICING
int yield = SliceTime && (_k_current_task->Prio >= SlicePrio) &&
(++slice_count >= SliceTime);
int yield = slice_time && (_k_current_task->Prio >= SlicePrio) &&
(++slice_count >= slice_time);
if (yield) {
slice_count = 0;
K_yield(NULL);
@ -295,7 +295,7 @@ void scheduler_time_slice_set(int32_t t, /* time slice in ticks */
time slicing applies */
)
{
SliceTime = t;
slice_time = t;
SlicePrio = p;
}