Rename K_Args to _k_command_stack

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: I5e249e34ee9666666e31db6b9f71fe2abcc22400
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-27 10:28:29 -05:00 committed by Anas Nashif
parent 48c73dbe5d
commit 93a1d7ca89
15 changed files with 37 additions and 37 deletions

View file

@ -79,7 +79,7 @@ void _TaskAbort(void)
cmdpacket.Args.g1.opt = taskAbortCode; cmdpacket.Args.g1.opt = taskAbortCode;
cmdpacket.alloc = false; cmdpacket.alloc = false;
_k_current_task->Args = &cmdpacket; _k_current_task->Args = &cmdpacket;
nano_isr_stack_push(&K_Args, (uint32_t) &cmdpacket); nano_isr_stack_push(&_k_command_stack, (uint32_t) &cmdpacket);
_ScbPendsvSet(); _ScbPendsvSet();
} }
} }

View file

@ -64,7 +64,7 @@ conjunction with a microkernel.
#include <microkernel.h> #include <microkernel.h>
#include <cputype.h> #include <cputype.h>
extern struct nano_stack K_Args; extern struct nano_stack _k_command_stack;
#endif /* CONFIG_MICROKERNEL */ #endif /* CONFIG_MICROKERNEL */
@ -317,7 +317,7 @@ void _TIMER_INT_HANDLER(void *unused)
idleMode = IDLE_NOT_TICKLESS; idleMode = IDLE_NOT_TICKLESS;
_SysIdleElapsedTicks = _SysIdleElapsedTicks =
idleOrigTicks + 1; /* actual # of idle ticks */ idleOrigTicks + 1; /* actual # of idle ticks */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} else { } else {
/* /*
* Increment the tick because _timer_idle_exit does not * Increment the tick because _timer_idle_exit does not
@ -335,7 +335,7 @@ void _TIMER_INT_HANDLER(void *unused)
*/ */
if (_SysIdleElapsedTicks == 1) { if (_SysIdleElapsedTicks == 1) {
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
} }
@ -348,7 +348,7 @@ void _TIMER_INT_HANDLER(void *unused)
*/ */
accumulatedCount += sys_clock_hw_cycles_per_tick; accumulatedCount += sys_clock_hw_cycles_per_tick;
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
#endif /* CONFIG_TICKLESS_IDLE */ #endif /* CONFIG_TICKLESS_IDLE */
numIdleTicks = _NanoIdleValGet(); /* get # of idle ticks requested */ numIdleTicks = _NanoIdleValGet(); /* get # of idle ticks requested */
@ -376,7 +376,7 @@ void _TIMER_INT_HANDLER(void *unused)
* one more tick has occurred -- don't need to do anything special since * one more tick has occurred -- don't need to do anything special since
* timer is already configured to interrupt on the following tick * timer is already configured to interrupt on the following tick
*/ */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
#else #else
_nano_ticks++; _nano_ticks++;
@ -587,7 +587,7 @@ void _timer_idle_exit(void)
* so _SysIdleElapsedTicks is adjusted to account for it. * so _SysIdleElapsedTicks is adjusted to account for it.
*/ */
_SysIdleElapsedTicks = idleOrigTicks - 1; _SysIdleElapsedTicks = idleOrigTicks - 1;
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} else { } else {
uint32_t elapsed; /* elapsed "counter time" */ uint32_t elapsed; /* elapsed "counter time" */
uint32_t remaining; /* remaining "counter time" */ uint32_t remaining; /* remaining "counter time" */
@ -619,7 +619,7 @@ void _timer_idle_exit(void)
if (_SysIdleElapsedTicks) { if (_SysIdleElapsedTicks) {
/* Announce elapsed ticks to the microkernel */ /* Announce elapsed ticks to the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
} }

View file

@ -76,7 +76,7 @@ In a nanokernel-only system this device driver omits more complex capabilities
#include <microkernel.h> #include <microkernel.h>
#include <cputype.h> #include <cputype.h>
extern struct nano_stack K_Args; extern struct nano_stack _k_command_stack;
#ifdef CONFIG_TICKLESS_IDLE #ifdef CONFIG_TICKLESS_IDLE
#define TIMER_SUPPORTS_TICKLESS #define TIMER_SUPPORTS_TICKLESS
@ -298,7 +298,7 @@ void _timer_int_handler(void *unused)
* timer is already configured to interrupt on the following tick * timer is already configured to interrupt on the following tick
*/ */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
#else #else
@ -335,7 +335,7 @@ void _timer_int_handler(void *unused)
*/ */
if (_SysIdleElapsedTicks == 1) { if (_SysIdleElapsedTicks == 1) {
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
#endif /* !TIMER_SUPPORTS_TICKLESS */ #endif /* !TIMER_SUPPORTS_TICKLESS */
@ -440,7 +440,7 @@ void _timer_idle_exit(void)
* is * is
* serviced. * serviced.
*/ */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
/* timer interrupt handler reprograms the timer for the next /* timer interrupt handler reprograms the timer for the next
* tick */ * tick */
@ -491,7 +491,7 @@ void _timer_idle_exit(void)
if (_SysIdleElapsedTicks) { if (_SysIdleElapsedTicks) {
/* Announce elapsed ticks to the microkernel */ /* Announce elapsed ticks to the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
/* /*

View file

@ -144,7 +144,7 @@ static unsigned char _TimerMode = TIMER_MODE_PERIODIC;
/* externs */ /* externs */
#ifdef CONFIG_MICROKERNEL #ifdef CONFIG_MICROKERNEL
extern struct nano_stack K_Args; extern struct nano_stack _k_command_stack;
#endif /* CONFIG_MICROKERNEL */ #endif /* CONFIG_MICROKERNEL */
/******************************************************************************* /*******************************************************************************
@ -331,7 +331,7 @@ void _timer_int_handler(void *unused /* parameter is not used */
*/ */
if (_SysIdleElapsedTicks == 1) { if (_SysIdleElapsedTicks == 1) {
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
#else #else
@ -340,7 +340,7 @@ void _timer_int_handler(void *unused /* parameter is not used */
#if defined(CONFIG_MICROKERNEL) #if defined(CONFIG_MICROKERNEL)
/* announce tick into the microkernel */ /* announce tick into the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
#endif #endif
#endif /*TIMER_SUPPORTS_TICKLESS*/ #endif /*TIMER_SUPPORTS_TICKLESS*/
@ -528,7 +528,7 @@ void _timer_idle_exit(void)
* is * is
* serviced. * serviced.
*/ */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} else { } else {
uint32_t elapsed; /* elapsed "counter time" */ uint32_t elapsed; /* elapsed "counter time" */
uint32_t remaining; /* remaining "counter time" */ uint32_t remaining; /* remaining "counter time" */
@ -552,7 +552,7 @@ void _timer_idle_exit(void)
if (_SysIdleElapsedTicks) { if (_SysIdleElapsedTicks) {
/* Announce elapsed ticks to the microkernel */ /* Announce elapsed ticks to the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
} }
_loApicTimerStart(); _loApicTimerStart();

View file

@ -154,7 +154,7 @@ static uint32_t oldAcc = 0; /* previous accumulated value value */
/* externs */ /* externs */
#ifdef CONFIG_MICROKERNEL #ifdef CONFIG_MICROKERNEL
extern struct nano_stack K_Args; extern struct nano_stack _k_command_stack;
#endif /* ! CONFIG_MICROKERNEL */ #endif /* ! CONFIG_MICROKERNEL */
#ifdef __DCC__ #ifdef __DCC__
@ -297,7 +297,7 @@ void _timer_int_handler(void *unusedArg /* not used */
*/ */
if (_SysIdleElapsedTicks == 1) { if (_SysIdleElapsedTicks == 1) {
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
/* accumulate total counter value */ /* accumulate total counter value */
@ -306,7 +306,7 @@ void _timer_int_handler(void *unusedArg /* not used */
#else #else
#if defined(CONFIG_MICROKERNEL) #if defined(CONFIG_MICROKERNEL)
/* announce tick into the microkernel */ /* announce tick into the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
#endif #endif
/* accumulate total counter value */ /* accumulate total counter value */
@ -476,7 +476,7 @@ void _timer_idle_exit(void)
* is * is
* serviced. * serviced.
*/ */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} else { } else {
uint16_t elapsed; /* elapsed "counter time" */ uint16_t elapsed; /* elapsed "counter time" */
uint16_t remaining; /* remaing "counter time" */ uint16_t remaining; /* remaing "counter time" */
@ -499,7 +499,7 @@ void _timer_idle_exit(void)
if (_SysIdleElapsedTicks) { if (_SysIdleElapsedTicks) {
/* Announce elapsed ticks to the microkernel */ /* Announce elapsed ticks to the microkernel */
nano_isr_stack_push(&K_Args, TICK_EVENT); nano_isr_stack_push(&_k_command_stack, TICK_EVENT);
} }
} }
} }

View file

@ -51,7 +51,7 @@ extern char _k_server_stack[]; /* generated by SYSGEN */
*/ */
uint32_t _k_task_priority_bitmap[2] = {0, (1u << 31)}; uint32_t _k_task_priority_bitmap[2] = {0, (1u << 31)};
struct nano_stack __noinit K_Args; struct nano_stack __noinit _k_command_stack;
#ifdef CONFIG_TASK_DEBUG #ifdef CONFIG_TASK_DEBUG
@ -87,7 +87,7 @@ void kernel_init(void)
#ifdef CONFIG_INIT_STACKS #ifdef CONFIG_INIT_STACKS
k_memset((char *)_k_server_command_stack_storage, 0xaa, sizeof(_k_server_command_stack_storage)); k_memset((char *)_k_server_command_stack_storage, 0xaa, sizeof(_k_server_command_stack_storage));
#endif #endif
nano_stack_init(&K_Args, _k_server_command_stack_storage); nano_stack_init(&_k_command_stack, _k_server_command_stack_storage);
task_fiber_start((char *)_k_server_stack, task_fiber_start((char *)_k_server_stack,
K_StackSize, K_StackSize,

View file

@ -49,5 +49,5 @@ void K_taskcall(struct k_args *cmdpacket)
{ {
cmdpacket->alloc = false; cmdpacket->alloc = false;
_k_current_task->Args = cmdpacket; _k_current_task->Args = cmdpacket;
nano_task_stack_push(&K_Args, (uint32_t)cmdpacket); nano_task_stack_push(&_k_command_stack, (uint32_t)cmdpacket);
} }

View file

@ -69,7 +69,7 @@ extern K_TIMER *_k_timer_list_tail;
#endif #endif
extern int64_t _k_sys_clock_tick_count; extern int64_t _k_sys_clock_tick_count;
extern struct nano_stack K_Args; extern struct nano_stack _k_command_stack;
extern struct nano_lifo LinkIn[6]; extern struct nano_lifo LinkIn[6];
extern struct nano_lifo LinkOut[6]; extern struct nano_lifo LinkOut[6];
extern struct nano_lifo K_DataFree; extern struct nano_lifo K_DataFree;
@ -249,6 +249,6 @@ extern void wlMonitorCalibrate(void);
#define TO_ALIST(L, A) _Cpsh((L), (uint32_t)(A)) #define TO_ALIST(L, A) _Cpsh((L), (uint32_t)(A))
#define SENDARGS(A) _Cpsh(&K_Args, (uint32_t)(A)) #define SENDARGS(A) _Cpsh(&_k_command_stack, (uint32_t)(A))
#endif #endif

View file

@ -295,5 +295,5 @@ FUNC_ALIAS(isr_event_send, fiber_event_send, void);
void isr_event_send(kevent_t event /* event to signal */ void isr_event_send(kevent_t event /* event to signal */
) )
{ {
nano_isr_stack_push(&K_Args, (uint32_t)event); nano_isr_stack_push(&_k_command_stack, (uint32_t)event);
} }

View file

@ -884,7 +884,7 @@ int _task_mbox_data_get_async_block(struct k_msg *message,
__ASSERT_NO_MSG(NULL == Writer->Forw); __ASSERT_NO_MSG(NULL == Writer->Forw);
Writer->Args.m1.mess.tx_block.poolid = (uint32_t)(-1); Writer->Args.m1.mess.tx_block.poolid = (uint32_t)(-1);
nano_task_stack_push(&K_Args, (uint32_t)Writer); nano_task_stack_push(&_k_command_stack, (uint32_t)Writer);
#ifdef ACTIV_ASSERTS #ifdef ACTIV_ASSERTS
struct k_args *Dummy; struct k_args *Dummy;

View file

@ -221,7 +221,7 @@ void K_Defrag(struct k_args *A)
GETARGS(NewGet); GETARGS(NewGet);
*NewGet = *A; *NewGet = *A;
NewGet->Comm = GET_BLOCK_WAIT; NewGet->Comm = GET_BLOCK_WAIT;
TO_ALIST(&K_Args, NewGet); /*push on command stack */ TO_ALIST(&_k_command_stack, NewGet); /*push on command stack */
} }
} }
@ -645,7 +645,7 @@ void K_RelBlock(struct k_args *A)
GETARGS(NewGet); GETARGS(NewGet);
*NewGet = *A; *NewGet = *A;
NewGet->Comm = GET_BLOCK_WAIT; NewGet->Comm = GET_BLOCK_WAIT;
TO_ALIST(&K_Args, NewGet); /* push on command stack */ TO_ALIST(&_k_command_stack, NewGet); /* push on command stack */
} }
if (A->alloc) { if (A->alloc) {
FREEARGS(A); FREEARGS(A);

View file

@ -581,7 +581,7 @@ void isr_sem_give(ksem_t sema, /* semaphore to signal */
pCommand->Comm = SIGNALS; pCommand->Comm = SIGNALS;
pCommand->Args.s1.sema = sema; pCommand->Args.s1.sema = sema;
nano_isr_stack_push(&K_Args, (uint32_t)pCommand); nano_isr_stack_push(&_k_command_stack, (uint32_t)pCommand);
} }
/******************************************************************************* /*******************************************************************************

View file

@ -172,7 +172,7 @@ void force_timeout(struct k_args *A)
if (T->Ti != -1) { if (T->Ti != -1) {
delist_timer(T); delist_timer(T);
TO_ALIST(&K_Args, A); TO_ALIST(&_k_command_stack, A);
} }
} }

View file

@ -114,7 +114,7 @@ static inline void _HandleExpiredTimers(int ticks)
} else { } else {
T->Ti = -1; T->Ti = -1;
} }
TO_ALIST(&K_Args, T->Args); TO_ALIST(&_k_command_stack, T->Args);
ticks = 0; /* don't decrement Ti for subsequent timer(s) */ ticks = 0; /* don't decrement Ti for subsequent timer(s) */
} }

View file

@ -86,7 +86,7 @@ FUNC_NORETURN void K_swapper(int parameter1, /* not used */
while (1) { /* forever */ while (1) { /* forever */
pArgs = (struct k_args *)nano_fiber_stack_pop_wait( pArgs = (struct k_args *)nano_fiber_stack_pop_wait(
&K_Args); /* will schedule */ &_k_command_stack); /* will schedule */
do { do {
kevent_t event; kevent_t event;
/* if event < K_max_eventnr, it's a well-known event */ /* if event < K_max_eventnr, it's a well-known event */
@ -113,7 +113,7 @@ FUNC_NORETURN void K_swapper(int parameter1, /* not used */
if (_NanoKernel.fiber) { if (_NanoKernel.fiber) {
fiber_yield(); fiber_yield();
} }
} while (nano_fiber_stack_pop(&K_Args, (void *)&pArgs)); } while (nano_fiber_stack_pop(&_k_command_stack, (void *)&pArgs));
/* /*
* Always check higher priorities (lower numbers) first. * Always check higher priorities (lower numbers) first.