Rename K_MutexList to _k_mutex_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: I719d6f1a89b343d149eded7227534ee30055e030
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-27 10:28:24 -05:00 committed by Anas Nashif
commit 69bc5940d2
3 changed files with 6 additions and 6 deletions

View file

@ -48,7 +48,7 @@ extern int _k_task_count;
extern struct map_struct _k_mem_map_list[]; extern struct map_struct _k_mem_map_list[];
#endif #endif
extern struct mbx_struct _k_mbox_list[]; extern struct mbx_struct _k_mbox_list[];
extern struct mutex_struct K_MutexList[]; extern struct mutex_struct _k_mutex_list[];
extern struct sem_struct K_SemList[]; extern struct sem_struct K_SemList[];
extern struct que_struct K_QueList[]; extern struct que_struct K_QueList[];
extern struct pool_struct K_PoolList[]; extern struct pool_struct K_PoolList[];

View file

@ -94,7 +94,7 @@ void K_lockrpl(
A->Time.rcode = RC_TIME; A->Time.rcode = RC_TIME;
MutexId = A->Args.l1.mutex; MutexId = A->Args.l1.mutex;
Mutex = K_MutexList + OBJ_INDEX(MutexId); Mutex = _k_mutex_list + OBJ_INDEX(MutexId);
FirstWaiter = Mutex->Waiters; FirstWaiter = Mutex->Waiters;
@ -166,7 +166,7 @@ void K_lockreq(struct k_args *A /* pointer to mutex lock
MutexId = A->Args.l1.mutex; MutexId = A->Args.l1.mutex;
Mutex = K_MutexList + OBJ_INDEX(MutexId); Mutex = _k_mutex_list + OBJ_INDEX(MutexId);
if (Mutex->Level == 0 || Mutex->Owner == A->Args.l1.task) { if (Mutex->Level == 0 || Mutex->Owner == A->Args.l1.task) {
/* The mutex is either unowned or this is a nested lock. */ /* The mutex is either unowned or this is a nested lock. */
#ifdef CONFIG_OBJECT_MONITOR #ifdef CONFIG_OBJECT_MONITOR
@ -312,7 +312,7 @@ void K_unlock(struct k_args *A /* pointer to mutex unlock
struct k_args *PrioDowner; /* used to change a task's priority level */ struct k_args *PrioDowner; /* used to change a task's priority level */
MutexId = A->Args.l1.mutex; MutexId = A->Args.l1.mutex;
Mutex = K_MutexList + OBJ_INDEX(MutexId); Mutex = _k_mutex_list + OBJ_INDEX(MutexId);
if (Mutex->Owner == A->Args.l1.task && --(Mutex->Level) == 0) { if (Mutex->Owner == A->Args.l1.task && --(Mutex->Level) == 0) {
/* /*
* The requesting task owns the mutex and all locks * The requesting task owns the mutex and all locks

View file

@ -493,13 +493,13 @@ def kernel_main_c_mutexes():
total_mutexes = len(mutex_list) total_mutexes = len(mutex_list)
if (total_mutexes == 0): if (total_mutexes == 0):
kernel_main_c_out("\nstruct mutex_struct * K_MutexList = NULL;\n") kernel_main_c_out("\nstruct mutex_struct * _k_mutex_list = NULL;\n")
return return
# mutex descriptors # mutex descriptors
kernel_main_c_out("\n" + kernel_main_c_out("\n" +
"struct mutex_struct K_MutexList[%s] =\n" % (total_mutexes) + "struct mutex_struct _k_mutex_list[%s] =\n" % (total_mutexes) +
"{\n") "{\n")
for mutex in mutex_list: for mutex in mutex_list:
kernel_main_c_out(" {ANYTASK, 64, 64, 0, NULL, 0, 0},\n") kernel_main_c_out(" {ANYTASK, 64, 64, 0, NULL, 0, 0},\n")