diff --git a/arch/arm/core/task_abort.c b/arch/arm/core/task_abort.c index 4a50fcbbe40..28759d92d4d 100644 --- a/arch/arm/core/task_abort.c +++ b/arch/arm/core/task_abort.c @@ -77,7 +77,7 @@ void _TaskAbort(void) cmdpacket.Comm = TSKOP; cmdpacket.Args.g1.task = K_Task->Ident; cmdpacket.Args.g1.opt = taskAbortCode; - cmdpacket.Srce = 0; + cmdpacket.alloc = false; K_Task->Args = &cmdpacket; nano_isr_stack_push(&K_Args, (uint32_t) &cmdpacket); _ScbPendsvSet(); diff --git a/include/microkernel/cmdPkt.h b/include/microkernel/cmdPkt.h index 3f9ee4ab3c4..27b6a6c635d 100644 --- a/include/microkernel/cmdPkt.h +++ b/include/microkernel/cmdPkt.h @@ -54,7 +54,7 @@ extern "C" { * of command packets. * * INTERNAL -* It is critical that the word corresponding to the [Srce] field in the +* It is critical that the word corresponding to the [alloc] field in the * equivalent struct k_args command packet be zero so that the system knows that the * command packet is not part of the free list. */ diff --git a/include/microkernel/k_struct.h b/include/microkernel/k_struct.h index ae59333324b..ec99f513e15 100644 --- a/include/microkernel/k_struct.h +++ b/include/microkernel/k_struct.h @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -486,7 +487,7 @@ struct k_args { struct k_args *Forw; struct k_args **Head; kpriority_t Prio; - knode_t Srce; + bool alloc; /* true if allocated via GETARGS(); else false */ K_COMM Comm; K_CREF Ctxt; union { diff --git a/kernel/microkernel/core/taskcall.c b/kernel/microkernel/core/taskcall.c index 9bae8342ced..36f852b6be4 100644 --- a/kernel/microkernel/core/taskcall.c +++ b/kernel/microkernel/core/taskcall.c @@ -47,7 +47,7 @@ void K_taskcall(struct k_args *cmdpacket) { - cmdpacket->Srce = 0; + cmdpacket->alloc = false; K_Task->Args = cmdpacket; nano_task_stack_push(&K_Args, (uint32_t)cmdpacket); } diff --git a/kernel/microkernel/k_mbox.c b/kernel/microkernel/k_mbox.c index abad67a0428..65e12d8351f 100644 --- a/kernel/microkernel/k_mbox.c +++ b/kernel/microkernel/k_mbox.c @@ -144,7 +144,7 @@ static BOOL prepare_transfer(struct k_args *move, reader->Time.rcode = RC_OK; __ASSERT_NO_MSG(NULL == writer->Forw); - writer->Srce = K_ThisNode; + writer->alloc = true; writer->Comm = SEND_ACK; writer->Time.rcode = RC_OK; diff --git a/kernel/microkernel/k_mempool.c b/kernel/microkernel/k_mempool.c index fd1071053eb..01dc66f17fc 100644 --- a/kernel/microkernel/k_mempool.c +++ b/kernel/microkernel/k_mempool.c @@ -647,7 +647,7 @@ void K_RelBlock(struct k_args *A) NewGet->Comm = GET_BLOCK_WAIT; TO_ALIST(&K_Args, NewGet); /* push on command stack */ } - if (A->Srce) { + if (A->alloc) { FREEARGS(A); } return; diff --git a/kernel/microkernel/k_mutex.c b/kernel/microkernel/k_mutex.c index 56f85685ad3..8904b84c77d 100644 --- a/kernel/microkernel/k_mutex.c +++ b/kernel/microkernel/k_mutex.c @@ -127,7 +127,7 @@ void K_lockrpl( if (Mutex->OwnerCurrentPrio != newPriority) { GETARGS(PrioChanger); - PrioChanger->Srce = K_ThisNode; + PrioChanger->alloc = true; PrioChanger->Comm = SPRIO; PrioChanger->Prio = newPriority; PrioChanger->Args.g1.task = Mutex->Owner; @@ -245,7 +245,7 @@ void K_lockreq(struct k_args *A /* pointer to mutex lock /* Boost the priority level */ GETARGS(PrioBooster); - PrioBooster->Srce = K_ThisNode; + PrioBooster->alloc = true; PrioBooster->Comm = SPRIO; PrioBooster->Prio = BoostedPrio; PrioBooster->Args.g1.task = Mutex->Owner; @@ -334,7 +334,7 @@ void K_unlock(struct k_args *A /* pointer to mutex unlock */ GETARGS(PrioDowner); - PrioDowner->Srce = K_ThisNode; + PrioDowner->alloc = true; PrioDowner->Comm = SPRIO; PrioDowner->Prio = Mutex->OwnerOriginalPrio; PrioDowner->Args.g1.task = Mutex->Owner; diff --git a/kernel/microkernel/k_task.c b/kernel/microkernel/k_task.c index 86747f21d2d..71163278fc3 100644 --- a/kernel/microkernel/k_task.c +++ b/kernel/microkernel/k_task.c @@ -380,7 +380,7 @@ void K_set_prio(struct k_args *A) X->Prio = A->Args.g1.prio; reset_state_bit(X, TF_PRIO); - if (A->Srce) + if (A->alloc) FREEARGS(A); }