Rename K_MapList to _k_mem_map_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: I12ab3ee4111a32afc674b654bf0a914012ec0318
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-27 10:28:23 -05:00 committed by Anas Nashif
parent 3473bb7609
commit 59d838355a
3 changed files with 8 additions and 8 deletions

View file

@ -45,7 +45,7 @@ extern struct k_tqhd _k_task_priority_list[];
extern int _k_task_count;
#ifndef LITE
extern struct map_struct K_MapList[];
extern struct map_struct _k_mem_map_list[];
#endif
extern struct mbx_struct K_MbxList[];
extern struct mutex_struct K_MutexList[];

View file

@ -31,7 +31,7 @@
*/
#include "microkernel/k_struct.h"
#include "minik.h" /* K_MapList, K_MapCount */
#include "minik.h" /* _k_mem_map_list, K_MapCount */
#include <sections.h>
/*******************************************************************************
@ -48,7 +48,7 @@ void InitMap(void)
int i, j, w;
struct map_struct *M;
for (i = 0, M = K_MapList; i < K_MapCount; i++, M++) {
for (i = 0, M = _k_mem_map_list; i < K_MapCount; i++, M++) {
char *p;
char *q;
@ -95,7 +95,7 @@ void K_alloctmo(struct k_args *A)
void K_alloc(struct k_args *A)
{
struct map_struct *M = K_MapList + OBJ_INDEX(A->Args.a1.mmap);
struct map_struct *M = _k_mem_map_list + OBJ_INDEX(A->Args.a1.mmap);
if (M->Free != NULL) {
*(A->Args.a1.mptr) = M->Free;
@ -162,7 +162,7 @@ int _task_mem_map_alloc(kmemory_map_t mmap, /* memory map from which to request
void K_dealloc(struct k_args *A)
{
struct map_struct *M = K_MapList + OBJ_INDEX(A->Args.a1.mmap);
struct map_struct *M = _k_mem_map_list + OBJ_INDEX(A->Args.a1.mmap);
struct k_args *X;
**(char ***)(A->Args.a1.mptr) = M->Free;
@ -226,5 +226,5 @@ void _task_mem_map_free(kmemory_map_t mmap, /* memory map */
int task_mem_map_used_get(kmemory_map_t mmap /* memory map */
)
{
return K_MapList[OBJ_INDEX(mmap)].Nused;
return _k_mem_map_list[OBJ_INDEX(mmap)].Nused;
}

View file

@ -635,7 +635,7 @@ def kernel_main_c_maps():
kernel_main_c_out("\nint K_MapCount = %d;\n" % (total_maps))
if (total_maps == 0):
kernel_main_c_out("\nstruct map_struct * K_MapList = NULL;\n")
kernel_main_c_out("\nstruct map_struct * _k_mem_map_list = NULL;\n")
return
# memory map buffers
@ -651,7 +651,7 @@ def kernel_main_c_maps():
# memory map descriptors
kernel_main_c_out(
"\nstruct map_struct K_MapList[%d] =\n{\n" % (total_maps))
"\nstruct map_struct _k_mem_map_list[%d] =\n{\n" % (total_maps))
for map in map_list:
blocks = map[1]
block_size = map[2]