Luca
Fork of mbed-rtos by
Diff: rtx/TARGET_CORTEX_M/rt_List.c
- Revision:
- 112:53ace74b190c
- Parent:
- 49:77c8e4604045
--- a/rtx/TARGET_CORTEX_M/rt_List.c Tue May 03 00:15:52 2016 +0100 +++ b/rtx/TARGET_CORTEX_M/rt_List.c Thu May 05 20:45:13 2016 +0100 @@ -1,12 +1,12 @@ /*---------------------------------------------------------------------------- - * RL-ARM - RTX + * CMSIS-RTOS - RTX *---------------------------------------------------------------------------- * Name: RT_LIST.C * Purpose: Functions for the management of different lists - * Rev.: V4.60 + * Rev.: V4.79 *---------------------------------------------------------------------------- * - * Copyright (c) 1999-2009 KEIL, 2009-2012 ARM Germany GmbH + * Copyright (c) 1999-2009 KEIL, 2009-2015 ARM Germany GmbH * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,7 +33,7 @@ *---------------------------------------------------------------------------*/ #include "rt_TypeDef.h" -#include "RTX_Conf.h" +#include "RTX_Config.h" #include "rt_System.h" #include "rt_List.h" #include "rt_Task.h" @@ -65,13 +65,13 @@ U32 prio; BOOL sem_mbx = __FALSE; - if (p_CB->cb_type == SCB || p_CB->cb_type == MCB || p_CB->cb_type == MUCB) { + if ((p_CB->cb_type == SCB) || (p_CB->cb_type == MCB) || (p_CB->cb_type == MUCB)) { sem_mbx = __TRUE; } prio = p_task->prio; p_CB2 = p_CB->p_lnk; /* Search for an entry in the list */ - while (p_CB2 != NULL && prio <= p_CB2->prio) { + while ((p_CB2 != NULL) && (prio <= p_CB2->prio)) { p_CB = (P_XCB)p_CB2; p_CB2 = p_CB2->p_lnk; } @@ -99,7 +99,7 @@ p_first = p_CB->p_lnk; p_CB->p_lnk = p_first->p_lnk; - if (p_CB->cb_type == SCB || p_CB->cb_type == MCB || p_CB->cb_type == MUCB) { + if ((p_CB->cb_type == SCB) || (p_CB->cb_type == MCB) || (p_CB->cb_type == MUCB)) { if (p_first->p_lnk != NULL) { p_first->p_lnk->p_rlnk = (P_TCB)p_CB; p_first->p_lnk = NULL; @@ -176,7 +176,7 @@ p = (P_TCB)&os_dly; if (p->p_dlnk == NULL) { /* Delay list empty */ - delta = 0; + delta = 0U; goto last; } delta = os_dly.delta_time; @@ -187,7 +187,7 @@ p->p_dlnk = p_task; p_task->p_blnk = p; p->delta_time = (U16)(idelay - delta); - p_task->delta_time = 0; + p_task->delta_time = 0U; return; } p = p->p_dlnk; @@ -215,7 +215,7 @@ return; } os_dly.delta_time--; - while ((os_dly.delta_time == 0) && (os_dly.p_dlnk != NULL)) { + while ((os_dly.delta_time == 0U) && (os_dly.p_dlnk != NULL)) { p_rdy = os_dly.p_dlnk; if (p_rdy->p_rlnk != NULL) { /* Task is really enqueued, remove task from semaphore/mailbox */ @@ -236,7 +236,7 @@ p_rdy->state = READY; os_dly.p_dlnk = p_rdy->p_dlnk; if (p_rdy->p_dlnk != NULL) { - p_rdy->p_dlnk->p_blnk = (P_TCB)&os_dly; + p_rdy->p_dlnk->p_blnk = (P_TCB)&os_dly; p_rdy->p_dlnk = NULL; } p_rdy->p_blnk = NULL; @@ -290,7 +290,7 @@ } else { /* 'p_task' is at the end of list */ - p_b->delta_time = 0; + p_b->delta_time = 0U; } p_task->p_blnk = NULL; } @@ -313,8 +313,6 @@ } } - /*---------------------------------------------------------------------------- * end of file *---------------------------------------------------------------------------*/ -