Rename microkernel struct field 'Head' to 'head'.
Rename field 'Head' of the struct: - 'k_tqhd' in the file kernel/microkernel/include/micro_private_types.h - 'k_args' in the file kernel/microkernel/include/micro_private_types.h - 'List' in the file include/misc/lists.h Change-Id: Id7c2bdfc8d928ca835894acd9125c0ec96502ff0 Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
parent
727e3d98d8
commit
9a8e20c697
10 changed files with 33 additions and 33 deletions
|
@ -48,7 +48,7 @@ struct Elem {
|
||||||
|
|
||||||
|
|
||||||
struct List {
|
struct List {
|
||||||
struct list_elem *Head;
|
struct list_elem *head;
|
||||||
struct list_elem *Tail;
|
struct list_elem *Tail;
|
||||||
struct list_elem *TailPrev;
|
struct list_elem *TailPrev;
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,8 +45,8 @@ Example code from list insertion etc
|
||||||
|
|
||||||
INLINE void InitList(struct list_head *list)
|
INLINE void InitList(struct list_head *list)
|
||||||
{
|
{
|
||||||
list->Head = (struct list_elem *)&list->Tail;
|
list->head = (struct list_elem *)&list->Tail;
|
||||||
list->TailPrev = (struct list_elem *)&list->Head;
|
list->TailPrev = (struct list_elem *)&list->head;
|
||||||
list->Tail = NULL;
|
list->Tail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,13 +70,13 @@ INLINE struct list_elem *RemoveHead(struct list_head *list)
|
||||||
struct list_elem *tmpElem;
|
struct list_elem *tmpElem;
|
||||||
struct list_elem *ret_Elem;
|
struct list_elem *ret_Elem;
|
||||||
|
|
||||||
ret_Elem = list->Head;
|
ret_Elem = list->head;
|
||||||
tmpElem = ret_Elem->next;
|
tmpElem = ret_Elem->next;
|
||||||
if (tmpElem == NULL) {
|
if (tmpElem == NULL) {
|
||||||
return NULL; /* empty list */
|
return NULL; /* empty list */
|
||||||
}
|
}
|
||||||
list->Head = tmpElem;
|
list->head = tmpElem;
|
||||||
tmpElem->prev = (struct list_elem *)&list->Head;
|
tmpElem->prev = (struct list_elem *)&list->head;
|
||||||
return ret_Elem;
|
return ret_Elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,12 +98,12 @@ INLINE void AddHead(struct list_head *list, struct list_elem *elem)
|
||||||
{
|
{
|
||||||
struct list_elem *tmpElem;
|
struct list_elem *tmpElem;
|
||||||
|
|
||||||
tmpElem = list->Head;
|
tmpElem = list->head;
|
||||||
list->Head = elem;
|
list->head = elem;
|
||||||
tmpElem->prev = elem;
|
tmpElem->prev = elem;
|
||||||
/* set pointers for the new elem */
|
/* set pointers for the new elem */
|
||||||
elem->next = tmpElem;
|
elem->next = tmpElem;
|
||||||
elem->prev = (struct list_elem *)&list->Head;
|
elem->prev = (struct list_elem *)&list->head;
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE void AddTail(struct list_head *list, struct list_elem *elem)
|
INLINE void AddTail(struct list_head *list, struct list_elem *elem)
|
||||||
|
@ -140,7 +140,7 @@ INLINE void InsertPrio(struct list_head *list, struct list_elem *newelem)
|
||||||
{
|
{
|
||||||
struct list_elem *tmpElem;
|
struct list_elem *tmpElem;
|
||||||
|
|
||||||
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->priority <= newelem->priority)) {
|
(tmpElem->priority <= newelem->priority)) {
|
||||||
tmpElem = tmpElem->next;
|
tmpElem = tmpElem->next;
|
||||||
|
|
|
@ -176,12 +176,12 @@ extern void _k_workload_monitor_idle_end(void);
|
||||||
else \
|
else \
|
||||||
(L) = (E); \
|
(L) = (E); \
|
||||||
(E)->next = X; \
|
(E)->next = X; \
|
||||||
(E)->Head = &(L); \
|
(E)->head = &(L); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define REMOVE_ELM(E) \
|
#define REMOVE_ELM(E) \
|
||||||
{ \
|
{ \
|
||||||
struct k_args *X = *((E)->Head); \
|
struct k_args *X = *((E)->head); \
|
||||||
struct k_args *Y = NULL; \
|
struct k_args *Y = NULL; \
|
||||||
\
|
\
|
||||||
while (X && (X != (E))) { \
|
while (X && (X != (E))) { \
|
||||||
|
@ -192,7 +192,7 @@ extern void _k_workload_monitor_idle_end(void);
|
||||||
if (Y) \
|
if (Y) \
|
||||||
Y->next = X->next; \
|
Y->next = X->next; \
|
||||||
else \
|
else \
|
||||||
*((E)->Head) = X->next; \
|
*((E)->head) = X->next; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ struct k_timer {
|
||||||
/* Task queue header */
|
/* Task queue header */
|
||||||
|
|
||||||
struct k_tqhd {
|
struct k_tqhd {
|
||||||
struct k_task *Head;
|
struct k_task *head;
|
||||||
struct k_task *Tail;
|
struct k_task *Tail;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -376,7 +376,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 priority;
|
kpriority_t priority;
|
||||||
|
|
||||||
/* 'alloc' is true if k_args is allocated via GETARGS() */
|
/* 'alloc' is true if k_args is allocated via GETARGS() */
|
||||||
|
|
|
@ -86,7 +86,7 @@ void _k_pipe_get_request(struct k_args *RequestOrig)
|
||||||
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
|
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
|
||||||
|
|
||||||
RequestProc->next = NULL;
|
RequestProc->next = NULL;
|
||||||
RequestProc->Head = NULL;
|
RequestProc->head = NULL;
|
||||||
|
|
||||||
switch (RequestProc->Time.ticks) {
|
switch (RequestProc->Time.ticks) {
|
||||||
case TICKS_NONE:
|
case TICKS_NONE:
|
||||||
|
@ -219,7 +219,7 @@ void _k_pipe_get_reply(struct k_args *ReqProc)
|
||||||
__ASSERT_NO_MSG(
|
__ASSERT_NO_MSG(
|
||||||
(0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers) /* no pending Xfers */
|
(0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers) /* no pending Xfers */
|
||||||
&& (NULL == ReqProc->Time.timer) /* no pending timer */
|
&& (NULL == ReqProc->Time.timer) /* no pending timer */
|
||||||
&& (NULL == ReqProc->Head)); /* not in list */
|
&& (NULL == ReqProc->head)); /* not in list */
|
||||||
|
|
||||||
/* orig packet must be sent back, not ReqProc */
|
/* orig packet must be sent back, not ReqProc */
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void _k_pipe_put_request(struct k_args *RequestOrig)
|
||||||
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
|
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
|
||||||
|
|
||||||
RequestProc->next = NULL;
|
RequestProc->next = NULL;
|
||||||
RequestProc->Head = NULL;
|
RequestProc->head = NULL;
|
||||||
|
|
||||||
switch (RequestProc->Time.ticks) {
|
switch (RequestProc->Time.ticks) {
|
||||||
case TICKS_NONE:
|
case TICKS_NONE:
|
||||||
|
@ -238,7 +238,7 @@ void _k_pipe_put_reply(struct k_args *ReqProc)
|
||||||
__ASSERT_NO_MSG(
|
__ASSERT_NO_MSG(
|
||||||
0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers /* no pending Xfers */
|
0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers /* no pending Xfers */
|
||||||
&& NULL == ReqProc->Time.timer /* no pending timer */
|
&& NULL == ReqProc->Time.timer /* no pending timer */
|
||||||
&& NULL == ReqProc->Head); /* not in list */
|
&& NULL == ReqProc->head); /* not in list */
|
||||||
|
|
||||||
/* orig packet must be sent back, not ReqProc */
|
/* orig packet must be sent back, not ReqProc */
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
|
|
||||||
void DeListWaiter(struct k_args *pReqProc)
|
void DeListWaiter(struct k_args *pReqProc)
|
||||||
{
|
{
|
||||||
__ASSERT_NO_MSG(NULL != pReqProc->Head);
|
__ASSERT_NO_MSG(NULL != pReqProc->head);
|
||||||
REMOVE_ELM(pReqProc);
|
REMOVE_ELM(pReqProc);
|
||||||
pReqProc->Head = NULL;
|
pReqProc->head = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void myfreetimer(struct k_timer **ppTimer)
|
void myfreetimer(struct k_timer **ppTimer)
|
||||||
|
|
|
@ -468,7 +468,7 @@ static void pipe_read(struct _k_pipe_struct *pPipe, struct k_args *pNewReader)
|
||||||
|
|
||||||
if (pipe_read_req->iSizeXferred == pipe_read_req->iSizeTotal) {
|
if (pipe_read_req->iSizeXferred == pipe_read_req->iSizeTotal) {
|
||||||
_k_pipe_request_status_set(pipe_read_req, TERM_SATISFIED);
|
_k_pipe_request_status_set(pipe_read_req, TERM_SATISFIED);
|
||||||
if (pReader->Head != NULL) {
|
if (pReader->head != NULL) {
|
||||||
DeListWaiter(pReader);
|
DeListWaiter(pReader);
|
||||||
myfreetimer(&pReader->Time.timer);
|
myfreetimer(&pReader->Time.timer);
|
||||||
}
|
}
|
||||||
|
@ -538,7 +538,7 @@ static void pipe_write(struct _k_pipe_struct *pPipe, struct k_args *pNewWriter)
|
||||||
|
|
||||||
if (pipe_write_req->iSizeXferred == pipe_write_req->iSizeTotal) {
|
if (pipe_write_req->iSizeXferred == pipe_write_req->iSizeTotal) {
|
||||||
_k_pipe_request_status_set(pipe_write_req, TERM_SATISFIED);
|
_k_pipe_request_status_set(pipe_write_req, TERM_SATISFIED);
|
||||||
if (pWriter->Head != NULL) {
|
if (pWriter->head != NULL) {
|
||||||
/* only listed requests have a timer */
|
/* only listed requests have a timer */
|
||||||
DeListWaiter(pWriter);
|
DeListWaiter(pWriter);
|
||||||
myfreetimer(&pWriter->Time.timer);
|
myfreetimer(&pWriter->Time.timer);
|
||||||
|
@ -569,7 +569,7 @@ static void pipe_xfer_status_update(
|
||||||
|
|
||||||
if (pipe_xfer_req->iSizeXferred == pipe_xfer_req->iSizeTotal) {
|
if (pipe_xfer_req->iSizeXferred == pipe_xfer_req->iSizeTotal) {
|
||||||
_k_pipe_request_status_set(pipe_xfer_req, TERM_SATISFIED);
|
_k_pipe_request_status_set(pipe_xfer_req, TERM_SATISFIED);
|
||||||
if (pActor->Head != NULL) {
|
if (pActor->head != NULL) {
|
||||||
DeListWaiter(pActor);
|
DeListWaiter(pActor);
|
||||||
myfreetimer(&pActor->Time.timer);
|
myfreetimer(&pActor->Time.timer);
|
||||||
}
|
}
|
||||||
|
@ -965,7 +965,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
|
||||||
TERM_FORCED);
|
TERM_FORCED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pReader->Head) {
|
if (pReader->head) {
|
||||||
DeListWaiter(pReader);
|
DeListWaiter(pReader);
|
||||||
myfreetimer(&(pReader->Time.timer));
|
myfreetimer(&(pReader->Time.timer));
|
||||||
}
|
}
|
||||||
|
@ -995,7 +995,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
|
||||||
TERM_FORCED);
|
TERM_FORCED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWriter->Head) {
|
if (pWriter->head) {
|
||||||
DeListWaiter(pWriter);
|
DeListWaiter(pWriter);
|
||||||
myfreetimer(&(pWriter->Time.timer));
|
myfreetimer(&(pWriter->Time.timer));
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1020,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
|
||||||
|
|
||||||
if (pReader) {
|
if (pReader) {
|
||||||
if (pReader->args.pipe_xfer_req.iSizeXferred != 0) {
|
if (pReader->args.pipe_xfer_req.iSizeXferred != 0) {
|
||||||
if (pReader->Head) {
|
if (pReader->head) {
|
||||||
myfreetimer(&(pReader->Time.timer));
|
myfreetimer(&(pReader->Time.timer));
|
||||||
/* do not delist however */
|
/* do not delist however */
|
||||||
}
|
}
|
||||||
|
@ -1028,7 +1028,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
|
||||||
}
|
}
|
||||||
if (pWriter) {
|
if (pWriter) {
|
||||||
if (pWriter->args.pipe_xfer_req.iSizeXferred != 0) {
|
if (pWriter->args.pipe_xfer_req.iSizeXferred != 0) {
|
||||||
if (pWriter->Head) {
|
if (pWriter->head) {
|
||||||
myfreetimer(&(pWriter->Time.timer));
|
myfreetimer(&(pWriter->Time.timer));
|
||||||
/* do not delist however */
|
/* do not delist however */
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ static struct k_task *next_task_select(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return _k_task_priority_list[K_PrioListIdx].Head;
|
return _k_task_priority_list[K_PrioListIdx].head;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -155,7 +155,7 @@ void _k_state_bit_set(
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
struct k_tqhd *task_queue = _k_task_priority_list + task_ptr->priority;
|
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);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search in the list for this task priority level,
|
* Search in the list for this task priority level,
|
||||||
|
@ -175,7 +175,7 @@ void _k_state_bit_set(
|
||||||
* If there are no more tasks of this priority that are
|
* If there are no more tasks of this priority that are
|
||||||
* 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->priority >> 5] &= ~(1 << (task_ptr->priority & 0x1F));
|
_k_task_priority_bitmap[task_ptr->priority >> 5] &= ~(1 << (task_ptr->priority & 0x1F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -550,11 +550,11 @@ void _k_task_yield(struct k_args *A)
|
||||||
struct k_task *X = _k_current_task->next;
|
struct k_task *X = _k_current_task->next;
|
||||||
|
|
||||||
ARG_UNUSED(A);
|
ARG_UNUSED(A);
|
||||||
if (X && H->Head == _k_current_task) {
|
if (X && H->head == _k_current_task) {
|
||||||
_k_current_task->next = NULL;
|
_k_current_task->next = NULL;
|
||||||
H->Tail->next = _k_current_task;
|
H->Tail->next = _k_current_task;
|
||||||
H->Tail = _k_current_task;
|
H->Tail = _k_current_task;
|
||||||
H->Head = X;
|
H->head = X;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue