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:
Yonattan Louise 2015-08-24 15:45:34 -05:00 committed by Anas Nashif
commit 9a8e20c697
10 changed files with 33 additions and 33 deletions

View file

@ -48,7 +48,7 @@ struct Elem {
struct List {
struct list_elem *Head;
struct list_elem *head;
struct list_elem *Tail;
struct list_elem *TailPrev;
};

View file

@ -45,8 +45,8 @@ Example code from list insertion etc
INLINE void InitList(struct list_head *list)
{
list->Head = (struct list_elem *)&list->Tail;
list->TailPrev = (struct list_elem *)&list->Head;
list->head = (struct list_elem *)&list->Tail;
list->TailPrev = (struct list_elem *)&list->head;
list->Tail = NULL;
}
@ -70,13 +70,13 @@ INLINE struct list_elem *RemoveHead(struct list_head *list)
struct list_elem *tmpElem;
struct list_elem *ret_Elem;
ret_Elem = list->Head;
ret_Elem = list->head;
tmpElem = ret_Elem->next;
if (tmpElem == NULL) {
return NULL; /* empty list */
}
list->Head = tmpElem;
tmpElem->prev = (struct list_elem *)&list->Head;
list->head = tmpElem;
tmpElem->prev = (struct list_elem *)&list->head;
return ret_Elem;
}
@ -98,12 +98,12 @@ INLINE void AddHead(struct list_head *list, struct list_elem *elem)
{
struct list_elem *tmpElem;
tmpElem = list->Head;
list->Head = elem;
tmpElem = list->head;
list->head = elem;
tmpElem->prev = elem;
/* set pointers for the new elem */
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)
@ -140,7 +140,7 @@ INLINE void InsertPrio(struct list_head *list, struct list_elem *newelem)
{
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 */
(tmpElem->priority <= newelem->priority)) {
tmpElem = tmpElem->next;

View file

@ -176,12 +176,12 @@ extern void _k_workload_monitor_idle_end(void);
else \
(L) = (E); \
(E)->next = X; \
(E)->Head = &(L); \
(E)->head = &(L); \
}
#define REMOVE_ELM(E) \
{ \
struct k_args *X = *((E)->Head); \
struct k_args *X = *((E)->head); \
struct k_args *Y = NULL; \
\
while (X && (X != (E))) { \
@ -192,7 +192,7 @@ extern void _k_workload_monitor_idle_end(void);
if (Y) \
Y->next = X->next; \
else \
*((E)->Head) = X->next; \
*((E)->head) = X->next; \
} \
}

View file

@ -141,7 +141,7 @@ struct k_timer {
/* Task queue header */
struct k_tqhd {
struct k_task *Head;
struct k_task *head;
struct k_task *Tail;
};
@ -376,7 +376,7 @@ union k_args_args {
*/
struct k_args {
struct k_args *next;
struct k_args **Head;
struct k_args **head;
kpriority_t priority;
/* 'alloc' is true if k_args is allocated via GETARGS() */

View file

@ -86,7 +86,7 @@ void _k_pipe_get_request(struct k_args *RequestOrig)
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
RequestProc->next = NULL;
RequestProc->Head = NULL;
RequestProc->head = NULL;
switch (RequestProc->Time.ticks) {
case TICKS_NONE:
@ -219,7 +219,7 @@ void _k_pipe_get_reply(struct k_args *ReqProc)
__ASSERT_NO_MSG(
(0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers) /* no pending Xfers */
&& (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 */

View file

@ -103,7 +103,7 @@ void _k_pipe_put_request(struct k_args *RequestOrig)
RequestProc->args.pipe_xfer_req.iSizeXferred = 0;
RequestProc->next = NULL;
RequestProc->Head = NULL;
RequestProc->head = NULL;
switch (RequestProc->Time.ticks) {
case TICKS_NONE:
@ -238,7 +238,7 @@ void _k_pipe_put_reply(struct k_args *ReqProc)
__ASSERT_NO_MSG(
0 == ReqProc->args.pipe_xfer_req.iNbrPendXfers /* no pending Xfers */
&& 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 */

View file

@ -42,9 +42,9 @@
void DeListWaiter(struct k_args *pReqProc)
{
__ASSERT_NO_MSG(NULL != pReqProc->Head);
__ASSERT_NO_MSG(NULL != pReqProc->head);
REMOVE_ELM(pReqProc);
pReqProc->Head = NULL;
pReqProc->head = NULL;
}
void myfreetimer(struct k_timer **ppTimer)

View file

@ -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) {
_k_pipe_request_status_set(pipe_read_req, TERM_SATISFIED);
if (pReader->Head != NULL) {
if (pReader->head != NULL) {
DeListWaiter(pReader);
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) {
_k_pipe_request_status_set(pipe_write_req, TERM_SATISFIED);
if (pWriter->Head != NULL) {
if (pWriter->head != NULL) {
/* only listed requests have a timer */
DeListWaiter(pWriter);
myfreetimer(&pWriter->Time.timer);
@ -569,7 +569,7 @@ static void pipe_xfer_status_update(
if (pipe_xfer_req->iSizeXferred == pipe_xfer_req->iSizeTotal) {
_k_pipe_request_status_set(pipe_xfer_req, TERM_SATISFIED);
if (pActor->Head != NULL) {
if (pActor->head != NULL) {
DeListWaiter(pActor);
myfreetimer(&pActor->Time.timer);
}
@ -965,7 +965,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
TERM_FORCED);
}
if (pReader->Head) {
if (pReader->head) {
DeListWaiter(pReader);
myfreetimer(&(pReader->Time.timer));
}
@ -995,7 +995,7 @@ void _k_pipe_process(struct _k_pipe_struct *pPipe, struct k_args *pNLWriter,
TERM_FORCED);
}
if (pWriter->Head) {
if (pWriter->head) {
DeListWaiter(pWriter);
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->args.pipe_xfer_req.iSizeXferred != 0) {
if (pReader->Head) {
if (pReader->head) {
myfreetimer(&(pReader->Time.timer));
/* 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->args.pipe_xfer_req.iSizeXferred != 0) {
if (pWriter->Head) {
if (pWriter->head) {
myfreetimer(&(pWriter->Time.timer));
/* do not delist however */
}

View file

@ -82,7 +82,7 @@ static struct k_task *next_task_select(void)
}
#endif
return _k_task_priority_list[K_PrioListIdx].Head;
return _k_task_priority_list[K_PrioListIdx].head;
}
/**

View file

@ -155,7 +155,7 @@ void _k_state_bit_set(
#endif
#endif
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,
@ -175,7 +175,7 @@ void _k_state_bit_set(
* If there are no more tasks of this priority that are
* 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));
}
}
@ -550,11 +550,11 @@ void _k_task_yield(struct k_args *A)
struct k_task *X = _k_current_task->next;
ARG_UNUSED(A);
if (X && H->Head == _k_current_task) {
if (X && H->head == _k_current_task) {
_k_current_task->next = NULL;
H->Tail->next = _k_current_task;
H->Tail = _k_current_task;
H->Head = X;
H->head = X;
}
}