Rename K_ThisNode to _k_this_node
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: I1b3cb984fa75cd1a83649c81787a40aee97f8a32
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
diff --git a/include/microkernel.h b/include/microkernel.h
index 24d023b..1c3a514 100644
--- a/include/microkernel.h
+++ b/include/microkernel.h
@@ -76,7 +76,7 @@
extern void kernel_init(void);
extern void init_node(void); /* generated function */
extern void init_drivers(void); /* generated function */
-extern const knode_t K_ThisNode;
+extern const knode_t _k_this_node;
extern int K_StackSize;
extern int K_TaskCount;
diff --git a/include/microkernel/task.h b/include/microkernel/task.h
index cf8e51a..3d2daea 100644
--- a/include/microkernel/task.h
+++ b/include/microkernel/task.h
@@ -40,7 +40,7 @@
#include <microkernel/task_api_export.h>
extern struct k_proc *K_Task;
-extern const knode_t K_ThisNode;
+extern const knode_t _k_this_node;
/*
* The following task groups are reserved for system use.
@@ -88,7 +88,7 @@
#define task_group_mask_get() (K_Task->Group)
#define task_group_join(g) (K_Task->Group |= g)
#define task_group_leave(g) (K_Task->Group &= ~g)
-#define task_node_id_get() (K_ThisNode)
+#define task_node_id_get() (_k_this_node)
#define isr_task_id_get() task_id_get()
#define isr_task_priority_get() task_priority_get()
diff --git a/include/microkernel/ticks.h b/include/microkernel/ticks.h
index 2e05de9..ed48238 100644
--- a/include/microkernel/ticks.h
+++ b/include/microkernel/ticks.h
@@ -50,7 +50,7 @@
extern K_TIMER *K_Ttail;
extern struct nano_lifo K_TimerFree;
extern K_TIMER K_TimerBlocks[]; /* array of microkernel timer objects */
-extern const knode_t K_ThisNode;
+extern const knode_t _k_this_node;
extern void scheduler_time_slice_set(int32_t t, kpriority_t p);
@@ -70,7 +70,7 @@
static inline ktimer_t _timer_ptr_to_id(K_TIMER *timer)
{
- return (ktimer_t)((K_ThisNode << 16) +
+ return (ktimer_t)((_k_this_node << 16) +
(uint32_t)(timer - &K_TimerBlocks[0]));
}
diff --git a/kernel/microkernel/include/minik.h b/kernel/microkernel/include/minik.h
index b6f8a06..1e12ecb 100644
--- a/kernel/microkernel/include/minik.h
+++ b/kernel/microkernel/include/minik.h
@@ -38,7 +38,7 @@
#define KERNEL_ENTRY(A) K_taskcall(A)
-extern const knode_t K_ThisNode;
+extern const knode_t _k_this_node;
extern struct k_proc _k_task_list[];
extern struct k_tqhd _k_task_priority_list[];
diff --git a/scripts/sysgen.py b/scripts/sysgen.py
index bd5d9dd..cee07e0 100755
--- a/scripts/sysgen.py
+++ b/scripts/sysgen.py
@@ -302,7 +302,7 @@
"#include <sections.h>\n" +
"#include <vxmicro.h>\n")
- kernel_main_c_out("\nconst knode_t K_ThisNode = 0x00010000;\n")
+ kernel_main_c_out("\nconst knode_t _k_this_node = 0x00010000;\n")
kernel_main_c_out("\n" +
"char __noinit _k_server_stack[CONFIG_MICROKERNEL_SERVER_STACK_SIZE];\n")
kernel_main_c_out(