Rename K_TaskList to _k_task_list

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: I4c27dd98967dedbb15e28618f5dd8f26b919579d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-27 10:28:21 -05:00 committed by Anas Nashif
parent 964a9c9d77
commit bf650d4fe5
4 changed files with 11 additions and 11 deletions

View file

@ -39,7 +39,7 @@
#define KERNEL_ENTRY(A) K_taskcall(A)
extern const knode_t K_ThisNode;
extern struct k_proc K_TaskList[];
extern struct k_proc _k_task_list[];
extern struct k_tqhd _k_task_priority_list[];
extern int K_TaskCount;

View file

@ -250,7 +250,7 @@ void task_abort_handler_set(void (*func)(void) /* abort handler */
void K_taskop(struct k_args *A)
{
ktask_t Tid = A->Args.g1.task;
struct k_proc *X = K_TaskList + OBJ_INDEX(Tid);
struct k_proc *X = _k_task_list + OBJ_INDEX(Tid);
switch (A->Args.g1.opt) {
case TASK_START:
@ -318,7 +318,7 @@ void K_groupop(struct k_args *A)
K_DebugHalt = 0;
#endif
for (i = 0, X = K_TaskList; i < K_TaskCount; i++, X++) {
for (i = 0, X = _k_task_list; i < K_TaskCount; i++, X++) {
if (X->Group & grp) {
switch (opt) {
case GROUP_TASK_START:
@ -374,7 +374,7 @@ void _task_group_ioctl(ktask_group_t group, /* task group */
void K_set_prio(struct k_args *A)
{
ktask_t Tid = A->Args.g1.task;
struct k_proc *X = K_TaskList + OBJ_INDEX(Tid);
struct k_proc *X = _k_task_list + OBJ_INDEX(Tid);
set_state_bit(X, TF_PRIO);
X->Prio = A->Args.g1.prio;
@ -471,6 +471,6 @@ void task_entry_set(ktask_t task, /* task */
void (*func)(void) /* entry point */
)
{
K_TaskList[OBJ_INDEX(task)].fstart = func;
_k_task_list[OBJ_INDEX(task)].fstart = func;
}

View file

@ -170,11 +170,11 @@ void _nano_init(tCCS *dummyOutContext, int argc, char *argv[], char *envp[])
_NanoKernel.task->flags |= ESSENTIAL;
#if defined(CONFIG_MICROKERNEL)
/* fill in microkernel's TCB, which is the last element in K_TaskList[]
/* fill in microkernel's TCB, which is the last element in _k_task_list[]
*/
K_TaskList[K_TaskCount].workspace = (char *)_NanoKernel.task;
K_TaskList[K_TaskCount].worksize = CONFIG_MAIN_STACK_SIZE;
_k_task_list[K_TaskCount].workspace = (char *)_NanoKernel.task;
_k_task_list[K_TaskCount].worksize = CONFIG_MAIN_STACK_SIZE;
#endif
/*

View file

@ -378,7 +378,7 @@ def kernel_main_c_tasks():
# task descriptors (including one for idle task)
kernel_main_c_out("\n" +
"struct k_proc K_TaskList[%d] =\n" % (total_tasks) +
"struct k_proc _k_task_list[%d] =\n" % (total_tasks) +
"{\n")
ident = 0x00010000
for task in task_list:
@ -419,7 +419,7 @@ def kernel_main_c_tasks():
# currently scheduled task (idle task)
kernel_main_c_out("\n" +
"struct k_proc * K_Task = &K_TaskList[%d];\n" % (total_tasks - 1))
"struct k_proc * K_Task = &_k_task_list[%d];\n" % (total_tasks - 1))
def kernel_main_c_priorities():
@ -437,7 +437,7 @@ def kernel_main_c_priorities():
kernel_main_c_out(
" {NULL, (struct k_proc *)&_k_task_priority_list[%d]},\n" % (i - 1))
kernel_main_c_out(
" {&K_TaskList[%d], &K_TaskList[%d]}\n" %
" {&_k_task_list[%d], &_k_task_list[%d]}\n" %
(total_tasks - 1, total_tasks - 1) +
"};\n")