First pass at updating from MISRA 2004 to MISRA 2012:

Updated pvContainer member of list items to List_t * rather than void * as they are always contained in a list if anywhere.
Made EventGroupHandle_t typesafe pointer to forward referenced struct rather than void pointer.
Made TaskHandle_t typesafe pointer to forward referenced struct, rather than a void pointer.
This commit is contained in:
Richard Barry
2018-06-03 22:57:46 +00:00
parent 5bebf10fa4
commit 390fb06b49
9 changed files with 184 additions and 147 deletions

View File

@ -58,7 +58,8 @@ extern "C" {
* \defgroup TaskHandle_t TaskHandle_t
* \ingroup Tasks
*/
typedef void * TaskHandle_t;
struct xTaskControlBlock;
typedef struct xTaskControlBlock* TaskHandle_t;
/*
* Defines the prototype to which the application task hook function must
@ -74,7 +75,7 @@ typedef enum
eBlocked, /* The task being queried is in the Blocked state. */
eSuspended, /* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */
eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */
eInvalid /* Used as an 'invalid state' value. */
eInvalid /* Used as an 'invalid state' value. */
} eTaskState;
/* Actions that can be performed when vTaskNotify() is called. */
@ -834,7 +835,7 @@ BaseType_t xTaskAbortDelay( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
/**
* task. h
* <pre>UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask );</pre>
* <pre>UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask );</pre>
*
* INCLUDE_uxTaskPriorityGet must be defined as 1 for this function to be available.
* See the configuration section for more information.
@ -877,15 +878,15 @@ BaseType_t xTaskAbortDelay( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
* \defgroup uxTaskPriorityGet uxTaskPriorityGet
* \ingroup TaskCtrl
*/
UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
/**
* task. h
* <pre>UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );</pre>
* <pre>UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask );</pre>
*
* A version of uxTaskPriorityGet() that can be used from an ISR.
*/
UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
/**
* task. h