Rename microkernel struct field 'Prio' to 'priority'.

Rename field 'Prio' of the structs:
- 'k_proc' in the file include/microkernel/base_api.h
- 'Elem' in the file include/misc/lists.h b/include/misc/lists.h

Change-Id: I2fd6966af29b998a3849bcabc5cfee110e76202c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-08-24 09:36:46 -05:00 committed by Anas Nashif
commit de4d3b51fc
15 changed files with 50 additions and 50 deletions

View file

@ -108,7 +108,7 @@ struct k_msg {
struct k_task {
struct k_task *next;
struct k_task *prev;
kpriority_t Prio;
kpriority_t priority;
ktask_t Ident;
uint32_t State;
uint32_t Group;

View file

@ -42,7 +42,7 @@ extern "C" {
struct Elem {
struct Elem *Next;
struct Elem *Prev;
unsigned int Prio;
unsigned int priority;
};

View file

@ -142,7 +142,7 @@ INLINE void InsertPrio(struct list_head *list, struct list_elem *newelem)
tmpElem = (struct list_elem *)&list->Head;
while ((tmpElem->Next != (struct list_elem *)&list->Tail) && /* end of list */
(tmpElem->Prio <= newelem->Prio)) {
(tmpElem->priority <= newelem->priority)) {
tmpElem = tmpElem->Next;
}
Insert_Elem(newelem, tmpElem);

View file

@ -167,7 +167,7 @@ extern void _k_workload_monitor_idle_end(void);
{ \
struct k_args *X = (L); \
struct k_args *Y = NULL; \
while (X && (X->Prio <= (E)->Prio)) { \
while (X && (X->priority <= (E)->priority)) { \
Y = X; \
X = X->next; \
} \

View file

@ -377,7 +377,7 @@ union k_args_args {
struct k_args {
struct k_args *next;
struct k_args **Head;
kpriority_t Prio;
kpriority_t priority;
/* 'alloc' is true if k_args is allocated via GETARGS() */
bool alloc;

View file

@ -142,7 +142,7 @@ void _k_fifo_enque_request(struct k_args *A)
} else {
if (likely(A->Time.ticks != TICKS_NONE)) {
A->Ctxt.task = _k_current_task;
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
_k_state_bit_set(_k_current_task, TF_ENQU);
INSERT_ELM(Q->Waiters, A);
#ifdef CONFIG_SYS_CLOCK_EXISTS
@ -275,7 +275,7 @@ void _k_fifo_deque_request(struct k_args *A)
} else {
if (likely(A->Time.ticks != TICKS_NONE)) {
A->Ctxt.task = _k_current_task;
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
_k_state_bit_set(_k_current_task, TF_DEQU);
INSERT_ELM(Q->Waiters, A);

View file

@ -157,7 +157,7 @@ static bool prepare_transfer(struct k_args *move,
* transfer the data with the highest
* priority of reader and writer
*/
move->Prio = max(writer->Prio, reader->Prio);
move->priority = max(writer->priority, reader->priority);
move->Ctxt.task = NULL;
move->Args.MovedReq.Action =
(MovedAction)(MVDACT_SNDACK | MVDACT_RCVACK);
@ -495,7 +495,7 @@ int _task_mbox_put(kmbox_t mbox,
M->extra.sema = 0;
M->mailbox = mbox;
A.Prio = prio;
A.priority = prio;
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
A.Time.ticks = time;
A.Args.m1.mess = *M;
@ -692,7 +692,7 @@ int _task_mbox_get(kmbox_t mbox,
* there is an assertion check in prepare_transfer() if equal to 0
*/
A.Prio = _k_current_task->Prio;
A.priority = _k_current_task->priority;
A.Comm = _K_SVC_MBOX_RECEIVE_REQUEST;
A.Time.ticks = time;
A.Args.m1.mess = *M;
@ -728,7 +728,7 @@ void _task_mbox_block_put(kmbox_t mbox,
#ifdef CONFIG_SYS_CLOCK_EXISTS
A.Time.timer = NULL;
#endif
A.Prio = prio;
A.priority = prio;
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
A.Args.m1.mess = *M;
KERNEL_ENTRY(&A);

View file

@ -123,7 +123,7 @@ void _k_mem_map_alloc(struct k_args *A)
*(A->Args.a1.mptr) = NULL;
if (likely(A->Time.ticks != TICKS_NONE)) {
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
A->Ctxt.task = _k_current_task;
_k_state_bit_set(_k_current_task, TF_ALLO);
INSERT_ELM(M->Waiters, A);

View file

@ -534,7 +534,7 @@ void _k_mem_pool_block_get(struct k_args *A)
(A->Time.ticks != TICKS_NONE) &&
(A->Args.p1.req_size <=
P->maxblock_size))) {/* timeout? but not block to large */
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
A->Ctxt.task = _k_current_task;
_k_state_bit_set(_k_current_task, TF_GTBL); /* extra new statebit */

View file

@ -111,8 +111,8 @@ void _k_mutex_lock_reply(
newPriority = Mutex->OwnerOriginalPrio;
if (FirstWaiter != NULL) {
newPriority = (FirstWaiter->Prio < newPriority)
? FirstWaiter->Prio
newPriority = (FirstWaiter->priority < newPriority)
? FirstWaiter->priority
: newPriority;
newPriority = (newPriority > CONFIG_PRIORITY_CEILING)
? newPriority
@ -123,7 +123,7 @@ void _k_mutex_lock_reply(
GETARGS(PrioChanger);
PrioChanger->alloc = true;
PrioChanger->Comm = _K_SVC_TASK_PRIORITY_SET;
PrioChanger->Prio = newPriority;
PrioChanger->priority = newPriority;
PrioChanger->Args.g1.task = Mutex->Owner;
PrioChanger->Args.g1.prio = newPriority;
SENDARGS(PrioChanger);
@ -192,7 +192,7 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
* task is on this node. This may be more recent than
* that stored in struct k_args.
*/
Mutex->OwnerCurrentPrio = _k_current_task->Prio;
Mutex->OwnerCurrentPrio = _k_current_task->priority;
/*
* Save the original priority when first acquiring the lock (but
@ -224,7 +224,7 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
* date.
*/
A->Ctxt.task = _k_current_task;
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
_k_state_bit_set(_k_current_task, TF_LOCK);
/* Note: Mutex->Waiters is a priority sorted list */
INSERT_ELM(Mutex->Waiters, A);
@ -241,7 +241,7 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
_k_timeout_alloc(A);
}
#endif
if (A->Prio < Mutex->OwnerCurrentPrio) {
if (A->priority < Mutex->OwnerCurrentPrio) {
/*
* The priority level of the owning task is less
* than that of the requesting task. Boost the
@ -250,8 +250,8 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
* Note that the boosted priority level is
* limited to <K_PrioCeiling>.
*/
BoostedPrio = (A->Prio > CONFIG_PRIORITY_CEILING)
? A->Prio
BoostedPrio = (A->priority > CONFIG_PRIORITY_CEILING)
? A->priority
: CONFIG_PRIORITY_CEILING;
if (BoostedPrio < Mutex->OwnerCurrentPrio) {
/* Boost the priority level */
@ -259,7 +259,7 @@ void _k_mutex_lock_request(struct k_args *A /* pointer to mutex lock
PrioBooster->alloc = true;
PrioBooster->Comm = _K_SVC_TASK_PRIORITY_SET;
PrioBooster->Prio = BoostedPrio;
PrioBooster->priority = BoostedPrio;
PrioBooster->Args.g1.task = Mutex->Owner;
PrioBooster->Args.g1.prio = BoostedPrio;
SENDARGS(PrioBooster);
@ -346,7 +346,7 @@ void _k_mutex_unlock(struct k_args *A /* pointer to mutex unlock
PrioDowner->alloc = true;
PrioDowner->Comm = _K_SVC_TASK_PRIORITY_SET;
PrioDowner->Prio = Mutex->OwnerOriginalPrio;
PrioDowner->priority = Mutex->OwnerOriginalPrio;
PrioDowner->Args.g1.task = Mutex->Owner;
PrioDowner->Args.g1.prio = Mutex->OwnerOriginalPrio;
SENDARGS(PrioDowner);
@ -363,8 +363,8 @@ void _k_mutex_unlock(struct k_args *A /* pointer to mutex unlock
Mutex->Waiters = X->next;
Mutex->Owner = X->Args.l1.task;
Mutex->Level = 1;
Mutex->OwnerCurrentPrio = X->Prio;
Mutex->OwnerOriginalPrio = X->Prio;
Mutex->OwnerCurrentPrio = X->priority;
Mutex->OwnerOriginalPrio = X->priority;
#ifdef CONFIG_SYS_CLOCK_EXISTS
if (X->Time.timer) {

View file

@ -96,7 +96,7 @@ int _task_pipe_get(kpipe_t Id, void *pBuffer,
return RC_FAIL;
}
A.Prio = _k_current_task->Prio;
A.priority = _k_current_task->priority;
A.Comm = _K_SVC_PIPE_GET_REQUEST;
A.Time.ticks = TimeOut;
@ -148,7 +148,7 @@ int _task_pipe_put(kpipe_t Id, void *pBuffer,
return RC_FAIL;
}
A.Prio = _k_current_task->Prio;
A.priority = _k_current_task->priority;
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
A.Time.ticks = TimeOut;
@ -193,7 +193,7 @@ int _task_pipe_block_put(kpipe_t Id, struct k_block Block,
return RC_FAIL;
}
A.Prio = _k_current_task->Prio;
A.priority = _k_current_task->priority;
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
A.Time.ticks = TICKS_UNLIMITED;
/* same behavior in flow as a blocking call w/o a timeout */

View file

@ -223,11 +223,11 @@ static kpriority_t move_priority_compute(struct k_args *pWriter,
kpriority_t move_priority;
if (!pWriter) {
move_priority = pReader->Prio;
move_priority = pReader->priority;
} else {
move_priority = pWriter->Prio;
if (pReader && (pReader->Prio < move_priority)) {
move_priority = pReader->Prio;
move_priority = pWriter->priority;
if (pReader && (pReader->priority < move_priority)) {
move_priority = pReader->priority;
}
}
@ -279,9 +279,9 @@ static void setup_movedata(struct k_args *A,
pContRecv->Args.pipe_xfer_ack.ID = XferID;
pContRecv->Args.pipe_xfer_ack.iSize = size;
A->Prio = move_priority_compute(pWriter, pReader);
pContSend->Prio = A->Prio;
pContRecv->Prio = A->Prio;
A->priority = move_priority_compute(pWriter, pReader);
pContSend->priority = A->priority;
pContRecv->priority = A->priority;
switch (XferType) {
case XFER_W2B: /* Writer to Buffer */

View file

@ -114,7 +114,7 @@ void _k_sem_group_wait_cancel(struct k_args *A)
struct k_args *X = S->Waiters;
struct k_args *Y = NULL;
while (X && (X->Prio <= A->Prio)) {
while (X && (X->priority <= A->priority)) {
if (X->Ctxt.args == A->Ctxt.args) {
if (Y) {
Y->next = X->next;
@ -170,7 +170,7 @@ void _k_sem_group_wait_accept(struct k_args *A)
struct k_args *X = S->Waiters;
struct k_args *Y = NULL;
while (X && (X->Prio <= A->Prio)) {
while (X && (X->priority <= A->priority)) {
if (X->Ctxt.args == A->Ctxt.args) {
if (Y) {
Y->next = X->next;
@ -207,7 +207,7 @@ void _k_sem_group_wait_timeout(struct k_args *A)
struct k_args *R;
GETARGS(R);
R->Prio = A->Prio;
R->priority = A->priority;
R->Comm =
((*L == A->Args.s1.sema) ?
_K_SVC_SEM_GROUP_WAIT_ACCEPT : _K_SVC_SEM_GROUP_WAIT_CANCEL);
@ -260,7 +260,7 @@ void _k_sem_group_wait_request(struct k_args *A)
struct k_args *X = S->Waiters;
struct k_args *Y = NULL;
while (X && (X->Prio <= A->Prio)) {
while (X && (X->priority <= A->priority)) {
if (X->Ctxt.args == A->Ctxt.args) {
if (Y) {
Y->next = X->next;
@ -304,7 +304,7 @@ void _k_sem_group_wait_any(struct k_args *A)
struct k_args *R;
GETARGS(R);
R->Prio = _k_current_task->Prio;
R->priority = _k_current_task->priority;
R->Comm = _K_SVC_SEM_GROUP_WAIT_REQUEST;
R->Ctxt.args = A;
R->Args.s1.sema = *L++;
@ -340,7 +340,7 @@ void _k_sem_wait_request(struct k_args *A)
A->Time.rcode = RC_OK;
} else if (A->Time.ticks != TICKS_NONE) {
A->Ctxt.task = _k_current_task;
A->Prio = _k_current_task->Prio;
A->priority = _k_current_task->priority;
_k_state_bit_set(_k_current_task, TF_SEMA);
INSERT_ELM(S->Waiters, A);
#ifdef CONFIG_SYS_CLOCK_EXISTS
@ -373,7 +373,7 @@ ksem_t _task_sem_group_take(ksemg_t group, int32_t time)
struct k_args A;
A.Comm = _K_SVC_SEM_GROUP_WAIT_ANY;
A.Prio = _k_current_task->Prio;
A.priority = _k_current_task->priority;
A.Time.ticks = time;
A.Args.s1.list = group;
KERNEL_ENTRY(&A);

View file

@ -86,12 +86,12 @@ void _k_state_bit_reset(struct k_task *X, /* ptr to task */
* be added to the list of schedulable tasks.
*/
struct k_tqhd *H = _k_task_priority_list + X->Prio;
struct k_tqhd *H = _k_task_priority_list + X->priority;
X->next = NULL;
H->Tail->next = X;
H->Tail = X;
_k_task_priority_bitmap[X->Prio >> 5] |= (1 << (X->Prio & 0x1F));
_k_task_priority_bitmap[X->priority >> 5] |= (1 << (X->priority & 0x1F));
}
#ifdef CONFIG_TASK_MONITOR
@ -154,7 +154,7 @@ void _k_state_bit_set(
volatile
#endif
#endif
struct k_tqhd *task_queue = _k_task_priority_list + task_ptr->Prio;
struct k_tqhd *task_queue = _k_task_priority_list + task_ptr->priority;
struct k_task *cur_task = (struct k_task *)(&task_queue->Head);
/*
@ -176,7 +176,7 @@ void _k_state_bit_set(
* runnable, then clear that bit in the global priority bit map.
*/
if (task_queue->Head == NULL) {
_k_task_priority_bitmap[task_ptr->Prio >> 5] &= ~(1 << (task_ptr->Prio & 0x1F));
_k_task_priority_bitmap[task_ptr->priority >> 5] &= ~(1 << (task_ptr->priority & 0x1F));
}
}
@ -487,7 +487,7 @@ void task_group_leave(uint32_t groups)
kpriority_t task_priority_get(void)
{
return _k_current_task->Prio;
return _k_current_task->priority;
}
/**
@ -503,7 +503,7 @@ void _k_task_priority_set(struct k_args *A)
struct k_task *X = (struct k_task *)Tid;
_k_state_bit_set(X, TF_PRIO);
X->Prio = A->Args.g1.prio;
X->priority = A->Args.g1.prio;
_k_state_bit_reset(X, TF_PRIO);
if (A->alloc)
@ -546,7 +546,7 @@ void task_priority_set(ktask_t task, /* task whose priority is to be set */
void _k_task_yield(struct k_args *A)
{
struct k_tqhd *H = _k_task_priority_list + _k_current_task->Prio;
struct k_tqhd *H = _k_task_priority_list + _k_current_task->priority;
struct k_task *X = _k_current_task->next;
ARG_UNUSED(A);

View file

@ -141,7 +141,7 @@ static inline int _TlDebugUpdate(int32_t ticks)
static inline void _TimeSliceUpdate(void)
{
#ifdef CONFIG_TIMESLICING
int yield = slice_time && (_k_current_task->Prio >= slice_prio) &&
int yield = slice_time && (_k_current_task->priority >= slice_prio) &&
(++slice_count >= slice_time);
if (yield) {
slice_count = 0;