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:
parent
09067bbe5b
commit
de4d3b51fc
15 changed files with 50 additions and 50 deletions
|
@ -108,7 +108,7 @@ struct k_msg {
|
||||||
struct k_task {
|
struct k_task {
|
||||||
struct k_task *next;
|
struct k_task *next;
|
||||||
struct k_task *prev;
|
struct k_task *prev;
|
||||||
kpriority_t Prio;
|
kpriority_t priority;
|
||||||
ktask_t Ident;
|
ktask_t Ident;
|
||||||
uint32_t State;
|
uint32_t State;
|
||||||
uint32_t Group;
|
uint32_t Group;
|
||||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
||||||
struct Elem {
|
struct Elem {
|
||||||
struct Elem *Next;
|
struct Elem *Next;
|
||||||
struct Elem *Prev;
|
struct Elem *Prev;
|
||||||
unsigned int Prio;
|
unsigned int priority;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ INLINE void InsertPrio(struct list_head *list, struct list_elem *newelem)
|
||||||
|
|
||||||
tmpElem = (struct list_elem *)&list->Head;
|
tmpElem = (struct list_elem *)&list->Head;
|
||||||
while ((tmpElem->Next != (struct list_elem *)&list->Tail) && /* end of list */
|
while ((tmpElem->Next != (struct list_elem *)&list->Tail) && /* end of list */
|
||||||
(tmpElem->Prio <= newelem->Prio)) {
|
(tmpElem->priority <= newelem->priority)) {
|
||||||
tmpElem = tmpElem->Next;
|
tmpElem = tmpElem->Next;
|
||||||
}
|
}
|
||||||
Insert_Elem(newelem, tmpElem);
|
Insert_Elem(newelem, tmpElem);
|
||||||
|
|
|
@ -167,7 +167,7 @@ extern void _k_workload_monitor_idle_end(void);
|
||||||
{ \
|
{ \
|
||||||
struct k_args *X = (L); \
|
struct k_args *X = (L); \
|
||||||
struct k_args *Y = NULL; \
|
struct k_args *Y = NULL; \
|
||||||
while (X && (X->Prio <= (E)->Prio)) { \
|
while (X && (X->priority <= (E)->priority)) { \
|
||||||
Y = X; \
|
Y = X; \
|
||||||
X = X->next; \
|
X = X->next; \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -377,7 +377,7 @@ union k_args_args {
|
||||||
struct k_args {
|
struct k_args {
|
||||||
struct k_args *next;
|
struct k_args *next;
|
||||||
struct k_args **Head;
|
struct k_args **Head;
|
||||||
kpriority_t Prio;
|
kpriority_t priority;
|
||||||
|
|
||||||
/* 'alloc' is true if k_args is allocated via GETARGS() */
|
/* 'alloc' is true if k_args is allocated via GETARGS() */
|
||||||
bool alloc;
|
bool alloc;
|
||||||
|
|
|
@ -142,7 +142,7 @@ void _k_fifo_enque_request(struct k_args *A)
|
||||||
} else {
|
} else {
|
||||||
if (likely(A->Time.ticks != TICKS_NONE)) {
|
if (likely(A->Time.ticks != TICKS_NONE)) {
|
||||||
A->Ctxt.task = _k_current_task;
|
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);
|
_k_state_bit_set(_k_current_task, TF_ENQU);
|
||||||
INSERT_ELM(Q->Waiters, A);
|
INSERT_ELM(Q->Waiters, A);
|
||||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||||
|
@ -275,7 +275,7 @@ void _k_fifo_deque_request(struct k_args *A)
|
||||||
} else {
|
} else {
|
||||||
if (likely(A->Time.ticks != TICKS_NONE)) {
|
if (likely(A->Time.ticks != TICKS_NONE)) {
|
||||||
A->Ctxt.task = _k_current_task;
|
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);
|
_k_state_bit_set(_k_current_task, TF_DEQU);
|
||||||
|
|
||||||
INSERT_ELM(Q->Waiters, A);
|
INSERT_ELM(Q->Waiters, A);
|
||||||
|
|
|
@ -157,7 +157,7 @@ static bool prepare_transfer(struct k_args *move,
|
||||||
* transfer the data with the highest
|
* transfer the data with the highest
|
||||||
* priority of reader and writer
|
* priority of reader and writer
|
||||||
*/
|
*/
|
||||||
move->Prio = max(writer->Prio, reader->Prio);
|
move->priority = max(writer->priority, reader->priority);
|
||||||
move->Ctxt.task = NULL;
|
move->Ctxt.task = NULL;
|
||||||
move->Args.MovedReq.Action =
|
move->Args.MovedReq.Action =
|
||||||
(MovedAction)(MVDACT_SNDACK | MVDACT_RCVACK);
|
(MovedAction)(MVDACT_SNDACK | MVDACT_RCVACK);
|
||||||
|
@ -495,7 +495,7 @@ int _task_mbox_put(kmbox_t mbox,
|
||||||
M->extra.sema = 0;
|
M->extra.sema = 0;
|
||||||
M->mailbox = mbox;
|
M->mailbox = mbox;
|
||||||
|
|
||||||
A.Prio = prio;
|
A.priority = prio;
|
||||||
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
|
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
|
||||||
A.Time.ticks = time;
|
A.Time.ticks = time;
|
||||||
A.Args.m1.mess = *M;
|
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
|
* 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.Comm = _K_SVC_MBOX_RECEIVE_REQUEST;
|
||||||
A.Time.ticks = time;
|
A.Time.ticks = time;
|
||||||
A.Args.m1.mess = *M;
|
A.Args.m1.mess = *M;
|
||||||
|
@ -728,7 +728,7 @@ void _task_mbox_block_put(kmbox_t mbox,
|
||||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||||
A.Time.timer = NULL;
|
A.Time.timer = NULL;
|
||||||
#endif
|
#endif
|
||||||
A.Prio = prio;
|
A.priority = prio;
|
||||||
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
|
A.Comm = _K_SVC_MBOX_SEND_REQUEST;
|
||||||
A.Args.m1.mess = *M;
|
A.Args.m1.mess = *M;
|
||||||
KERNEL_ENTRY(&A);
|
KERNEL_ENTRY(&A);
|
||||||
|
|
|
@ -123,7 +123,7 @@ void _k_mem_map_alloc(struct k_args *A)
|
||||||
*(A->Args.a1.mptr) = NULL;
|
*(A->Args.a1.mptr) = NULL;
|
||||||
|
|
||||||
if (likely(A->Time.ticks != TICKS_NONE)) {
|
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;
|
A->Ctxt.task = _k_current_task;
|
||||||
_k_state_bit_set(_k_current_task, TF_ALLO);
|
_k_state_bit_set(_k_current_task, TF_ALLO);
|
||||||
INSERT_ELM(M->Waiters, A);
|
INSERT_ELM(M->Waiters, A);
|
||||||
|
|
|
@ -534,7 +534,7 @@ void _k_mem_pool_block_get(struct k_args *A)
|
||||||
(A->Time.ticks != TICKS_NONE) &&
|
(A->Time.ticks != TICKS_NONE) &&
|
||||||
(A->Args.p1.req_size <=
|
(A->Args.p1.req_size <=
|
||||||
P->maxblock_size))) {/* timeout? but not block to large */
|
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;
|
A->Ctxt.task = _k_current_task;
|
||||||
_k_state_bit_set(_k_current_task, TF_GTBL); /* extra new statebit */
|
_k_state_bit_set(_k_current_task, TF_GTBL); /* extra new statebit */
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,8 @@ void _k_mutex_lock_reply(
|
||||||
newPriority = Mutex->OwnerOriginalPrio;
|
newPriority = Mutex->OwnerOriginalPrio;
|
||||||
|
|
||||||
if (FirstWaiter != NULL) {
|
if (FirstWaiter != NULL) {
|
||||||
newPriority = (FirstWaiter->Prio < newPriority)
|
newPriority = (FirstWaiter->priority < newPriority)
|
||||||
? FirstWaiter->Prio
|
? FirstWaiter->priority
|
||||||
: newPriority;
|
: newPriority;
|
||||||
newPriority = (newPriority > CONFIG_PRIORITY_CEILING)
|
newPriority = (newPriority > CONFIG_PRIORITY_CEILING)
|
||||||
? newPriority
|
? newPriority
|
||||||
|
@ -123,7 +123,7 @@ void _k_mutex_lock_reply(
|
||||||
GETARGS(PrioChanger);
|
GETARGS(PrioChanger);
|
||||||
PrioChanger->alloc = true;
|
PrioChanger->alloc = true;
|
||||||
PrioChanger->Comm = _K_SVC_TASK_PRIORITY_SET;
|
PrioChanger->Comm = _K_SVC_TASK_PRIORITY_SET;
|
||||||
PrioChanger->Prio = newPriority;
|
PrioChanger->priority = newPriority;
|
||||||
PrioChanger->Args.g1.task = Mutex->Owner;
|
PrioChanger->Args.g1.task = Mutex->Owner;
|
||||||
PrioChanger->Args.g1.prio = newPriority;
|
PrioChanger->Args.g1.prio = newPriority;
|
||||||
SENDARGS(PrioChanger);
|
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
|
* task is on this node. This may be more recent than
|
||||||
* that stored in struct k_args.
|
* 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
|
* 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.
|
* date.
|
||||||
*/
|
*/
|
||||||
A->Ctxt.task = _k_current_task;
|
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);
|
_k_state_bit_set(_k_current_task, TF_LOCK);
|
||||||
/* Note: Mutex->Waiters is a priority sorted list */
|
/* Note: Mutex->Waiters is a priority sorted list */
|
||||||
INSERT_ELM(Mutex->Waiters, A);
|
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);
|
_k_timeout_alloc(A);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (A->Prio < Mutex->OwnerCurrentPrio) {
|
if (A->priority < Mutex->OwnerCurrentPrio) {
|
||||||
/*
|
/*
|
||||||
* The priority level of the owning task is less
|
* The priority level of the owning task is less
|
||||||
* than that of the requesting task. Boost the
|
* 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
|
* Note that the boosted priority level is
|
||||||
* limited to <K_PrioCeiling>.
|
* limited to <K_PrioCeiling>.
|
||||||
*/
|
*/
|
||||||
BoostedPrio = (A->Prio > CONFIG_PRIORITY_CEILING)
|
BoostedPrio = (A->priority > CONFIG_PRIORITY_CEILING)
|
||||||
? A->Prio
|
? A->priority
|
||||||
: CONFIG_PRIORITY_CEILING;
|
: CONFIG_PRIORITY_CEILING;
|
||||||
if (BoostedPrio < Mutex->OwnerCurrentPrio) {
|
if (BoostedPrio < Mutex->OwnerCurrentPrio) {
|
||||||
/* Boost the priority level */
|
/* 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->alloc = true;
|
||||||
PrioBooster->Comm = _K_SVC_TASK_PRIORITY_SET;
|
PrioBooster->Comm = _K_SVC_TASK_PRIORITY_SET;
|
||||||
PrioBooster->Prio = BoostedPrio;
|
PrioBooster->priority = BoostedPrio;
|
||||||
PrioBooster->Args.g1.task = Mutex->Owner;
|
PrioBooster->Args.g1.task = Mutex->Owner;
|
||||||
PrioBooster->Args.g1.prio = BoostedPrio;
|
PrioBooster->Args.g1.prio = BoostedPrio;
|
||||||
SENDARGS(PrioBooster);
|
SENDARGS(PrioBooster);
|
||||||
|
@ -346,7 +346,7 @@ void _k_mutex_unlock(struct k_args *A /* pointer to mutex unlock
|
||||||
|
|
||||||
PrioDowner->alloc = true;
|
PrioDowner->alloc = true;
|
||||||
PrioDowner->Comm = _K_SVC_TASK_PRIORITY_SET;
|
PrioDowner->Comm = _K_SVC_TASK_PRIORITY_SET;
|
||||||
PrioDowner->Prio = Mutex->OwnerOriginalPrio;
|
PrioDowner->priority = Mutex->OwnerOriginalPrio;
|
||||||
PrioDowner->Args.g1.task = Mutex->Owner;
|
PrioDowner->Args.g1.task = Mutex->Owner;
|
||||||
PrioDowner->Args.g1.prio = Mutex->OwnerOriginalPrio;
|
PrioDowner->Args.g1.prio = Mutex->OwnerOriginalPrio;
|
||||||
SENDARGS(PrioDowner);
|
SENDARGS(PrioDowner);
|
||||||
|
@ -363,8 +363,8 @@ void _k_mutex_unlock(struct k_args *A /* pointer to mutex unlock
|
||||||
Mutex->Waiters = X->next;
|
Mutex->Waiters = X->next;
|
||||||
Mutex->Owner = X->Args.l1.task;
|
Mutex->Owner = X->Args.l1.task;
|
||||||
Mutex->Level = 1;
|
Mutex->Level = 1;
|
||||||
Mutex->OwnerCurrentPrio = X->Prio;
|
Mutex->OwnerCurrentPrio = X->priority;
|
||||||
Mutex->OwnerOriginalPrio = X->Prio;
|
Mutex->OwnerOriginalPrio = X->priority;
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||||
if (X->Time.timer) {
|
if (X->Time.timer) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ int _task_pipe_get(kpipe_t Id, void *pBuffer,
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
A.Prio = _k_current_task->Prio;
|
A.priority = _k_current_task->priority;
|
||||||
A.Comm = _K_SVC_PIPE_GET_REQUEST;
|
A.Comm = _K_SVC_PIPE_GET_REQUEST;
|
||||||
A.Time.ticks = TimeOut;
|
A.Time.ticks = TimeOut;
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ int _task_pipe_put(kpipe_t Id, void *pBuffer,
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
A.Prio = _k_current_task->Prio;
|
A.priority = _k_current_task->priority;
|
||||||
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
|
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
|
||||||
A.Time.ticks = TimeOut;
|
A.Time.ticks = TimeOut;
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ int _task_pipe_block_put(kpipe_t Id, struct k_block Block,
|
||||||
return RC_FAIL;
|
return RC_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
A.Prio = _k_current_task->Prio;
|
A.priority = _k_current_task->priority;
|
||||||
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
|
A.Comm = _K_SVC_PIPE_PUT_REQUEST;
|
||||||
A.Time.ticks = TICKS_UNLIMITED;
|
A.Time.ticks = TICKS_UNLIMITED;
|
||||||
/* same behavior in flow as a blocking call w/o a timeout */
|
/* same behavior in flow as a blocking call w/o a timeout */
|
||||||
|
|
|
@ -223,11 +223,11 @@ static kpriority_t move_priority_compute(struct k_args *pWriter,
|
||||||
kpriority_t move_priority;
|
kpriority_t move_priority;
|
||||||
|
|
||||||
if (!pWriter) {
|
if (!pWriter) {
|
||||||
move_priority = pReader->Prio;
|
move_priority = pReader->priority;
|
||||||
} else {
|
} else {
|
||||||
move_priority = pWriter->Prio;
|
move_priority = pWriter->priority;
|
||||||
if (pReader && (pReader->Prio < move_priority)) {
|
if (pReader && (pReader->priority < move_priority)) {
|
||||||
move_priority = pReader->Prio;
|
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.ID = XferID;
|
||||||
pContRecv->Args.pipe_xfer_ack.iSize = size;
|
pContRecv->Args.pipe_xfer_ack.iSize = size;
|
||||||
|
|
||||||
A->Prio = move_priority_compute(pWriter, pReader);
|
A->priority = move_priority_compute(pWriter, pReader);
|
||||||
pContSend->Prio = A->Prio;
|
pContSend->priority = A->priority;
|
||||||
pContRecv->Prio = A->Prio;
|
pContRecv->priority = A->priority;
|
||||||
|
|
||||||
switch (XferType) {
|
switch (XferType) {
|
||||||
case XFER_W2B: /* Writer to Buffer */
|
case XFER_W2B: /* Writer to Buffer */
|
||||||
|
|
|
@ -114,7 +114,7 @@ void _k_sem_group_wait_cancel(struct k_args *A)
|
||||||
struct k_args *X = S->Waiters;
|
struct k_args *X = S->Waiters;
|
||||||
struct k_args *Y = NULL;
|
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 (X->Ctxt.args == A->Ctxt.args) {
|
||||||
if (Y) {
|
if (Y) {
|
||||||
Y->next = X->next;
|
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 *X = S->Waiters;
|
||||||
struct k_args *Y = NULL;
|
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 (X->Ctxt.args == A->Ctxt.args) {
|
||||||
if (Y) {
|
if (Y) {
|
||||||
Y->next = X->next;
|
Y->next = X->next;
|
||||||
|
@ -207,7 +207,7 @@ void _k_sem_group_wait_timeout(struct k_args *A)
|
||||||
struct k_args *R;
|
struct k_args *R;
|
||||||
|
|
||||||
GETARGS(R);
|
GETARGS(R);
|
||||||
R->Prio = A->Prio;
|
R->priority = A->priority;
|
||||||
R->Comm =
|
R->Comm =
|
||||||
((*L == A->Args.s1.sema) ?
|
((*L == A->Args.s1.sema) ?
|
||||||
_K_SVC_SEM_GROUP_WAIT_ACCEPT : _K_SVC_SEM_GROUP_WAIT_CANCEL);
|
_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 *X = S->Waiters;
|
||||||
struct k_args *Y = NULL;
|
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 (X->Ctxt.args == A->Ctxt.args) {
|
||||||
if (Y) {
|
if (Y) {
|
||||||
Y->next = X->next;
|
Y->next = X->next;
|
||||||
|
@ -304,7 +304,7 @@ void _k_sem_group_wait_any(struct k_args *A)
|
||||||
struct k_args *R;
|
struct k_args *R;
|
||||||
|
|
||||||
GETARGS(R);
|
GETARGS(R);
|
||||||
R->Prio = _k_current_task->Prio;
|
R->priority = _k_current_task->priority;
|
||||||
R->Comm = _K_SVC_SEM_GROUP_WAIT_REQUEST;
|
R->Comm = _K_SVC_SEM_GROUP_WAIT_REQUEST;
|
||||||
R->Ctxt.args = A;
|
R->Ctxt.args = A;
|
||||||
R->Args.s1.sema = *L++;
|
R->Args.s1.sema = *L++;
|
||||||
|
@ -340,7 +340,7 @@ void _k_sem_wait_request(struct k_args *A)
|
||||||
A->Time.rcode = RC_OK;
|
A->Time.rcode = RC_OK;
|
||||||
} else if (A->Time.ticks != TICKS_NONE) {
|
} else if (A->Time.ticks != TICKS_NONE) {
|
||||||
A->Ctxt.task = _k_current_task;
|
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);
|
_k_state_bit_set(_k_current_task, TF_SEMA);
|
||||||
INSERT_ELM(S->Waiters, A);
|
INSERT_ELM(S->Waiters, A);
|
||||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
#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;
|
struct k_args A;
|
||||||
|
|
||||||
A.Comm = _K_SVC_SEM_GROUP_WAIT_ANY;
|
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.Time.ticks = time;
|
||||||
A.Args.s1.list = group;
|
A.Args.s1.list = group;
|
||||||
KERNEL_ENTRY(&A);
|
KERNEL_ENTRY(&A);
|
||||||
|
|
|
@ -86,12 +86,12 @@ void _k_state_bit_reset(struct k_task *X, /* ptr to task */
|
||||||
* be added to the list of schedulable tasks.
|
* 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;
|
X->next = NULL;
|
||||||
H->Tail->next = X;
|
H->Tail->next = X;
|
||||||
H->Tail = 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
|
#ifdef CONFIG_TASK_MONITOR
|
||||||
|
@ -154,7 +154,7 @@ void _k_state_bit_set(
|
||||||
volatile
|
volatile
|
||||||
#endif
|
#endif
|
||||||
#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);
|
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.
|
* runnable, then clear that bit in the global priority bit map.
|
||||||
*/
|
*/
|
||||||
if (task_queue->Head == NULL) {
|
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)
|
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;
|
struct k_task *X = (struct k_task *)Tid;
|
||||||
|
|
||||||
_k_state_bit_set(X, TF_PRIO);
|
_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);
|
_k_state_bit_reset(X, TF_PRIO);
|
||||||
|
|
||||||
if (A->alloc)
|
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)
|
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;
|
struct k_task *X = _k_current_task->next;
|
||||||
|
|
||||||
ARG_UNUSED(A);
|
ARG_UNUSED(A);
|
||||||
|
|
|
@ -141,7 +141,7 @@ static inline int _TlDebugUpdate(int32_t ticks)
|
||||||
static inline void _TimeSliceUpdate(void)
|
static inline void _TimeSliceUpdate(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_TIMESLICING
|
#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);
|
(++slice_count >= slice_time);
|
||||||
if (yield) {
|
if (yield) {
|
||||||
slice_count = 0;
|
slice_count = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue