* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c
pull/255/head^2
nazar01 4 years ago committed by GitHub
parent d0afede565
commit 6b4a3d0a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1630,6 +1630,7 @@ pvyieldevent
pwdtc pwdtc
pwm pwm
pwmc pwmc
pxtaskcode
pxblock pxblock
pxblocktoinsert pxblocktoinsert
pxcallbackfunction pxcallbackfunction
@ -2651,6 +2652,7 @@ wu
www www
wwwfreertos wwwfreertos
wxr wxr
xtasktodelete
xa xa
xaa xaa
xaaaa xaaaa

@ -979,7 +979,7 @@
#ifndef configMIN #ifndef configMIN
/* The application writer has not provided their own MAX macro, so define /* The application writer has not provided their own MIN macro, so define
* the following generic implementation. */ * the following generic implementation. */
#define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) ) #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
#endif #endif
@ -1105,7 +1105,7 @@
* data hiding policy, so the real structures used by FreeRTOS to maintain the * data hiding policy, so the real structures used by FreeRTOS to maintain the
* state of tasks, queues, semaphores, etc. are not accessible to the application * state of tasks, queues, semaphores, etc. are not accessible to the application
* code. However, if the application writer wants to statically allocate such * code. However, if the application writer wants to statically allocate such
* an object then the size of the object needs to be know. Dummy structures * an object then the size of the object needs to be known. Dummy structures
* that are guaranteed to have the same size and alignment requirements of the * that are guaranteed to have the same size and alignment requirements of the
* real objects are used for this purpose. The dummy list and list item * real objects are used for this purpose. The dummy list and list item
* structures below are used for inclusion in such a dummy structure. * structures below are used for inclusion in such a dummy structure.
@ -1154,7 +1154,7 @@ typedef struct xSTATIC_LIST
* strict data hiding policy. This means the Task structure used internally by * strict data hiding policy. This means the Task structure used internally by
* FreeRTOS is not accessible to application code. However, if the application * FreeRTOS is not accessible to application code. However, if the application
* writer wants to statically allocate the memory required to create a task then * writer wants to statically allocate the memory required to create a task then
* the size of the task object needs to be know. The StaticTask_t structure * the size of the task object needs to be known. The StaticTask_t structure
* below is provided for this purpose. Its sizes and alignment requirements are * below is provided for this purpose. Its sizes and alignment requirements are
* guaranteed to match those of the genuine structure, no matter which * guaranteed to match those of the genuine structure, no matter which
* architecture is being used, and no matter how the values in FreeRTOSConfig.h * architecture is being used, and no matter how the values in FreeRTOSConfig.h
@ -1217,7 +1217,7 @@ typedef struct xSTATIC_TCB
* strict data hiding policy. This means the Queue structure used internally by * strict data hiding policy. This means the Queue structure used internally by
* FreeRTOS is not accessible to application code. However, if the application * FreeRTOS is not accessible to application code. However, if the application
* writer wants to statically allocate the memory required to create a queue * writer wants to statically allocate the memory required to create a queue
* then the size of the queue object needs to be know. The StaticQueue_t * then the size of the queue object needs to be known. The StaticQueue_t
* structure below is provided for this purpose. Its sizes and alignment * structure below is provided for this purpose. Its sizes and alignment
* requirements are guaranteed to match those of the genuine structure, no * requirements are guaranteed to match those of the genuine structure, no
* matter which architecture is being used, and no matter how the values in * matter which architecture is being used, and no matter how the values in
@ -1288,7 +1288,7 @@ typedef struct xSTATIC_EVENT_GROUP
* strict data hiding policy. This means the software timer structure used * strict data hiding policy. This means the software timer structure used
* internally by FreeRTOS is not accessible to application code. However, if * internally by FreeRTOS is not accessible to application code. However, if
* the application writer wants to statically allocate the memory required to * the application writer wants to statically allocate the memory required to
* create a software timer then the size of the queue object needs to be know. * create a software timer then the size of the queue object needs to be known.
* The StaticTimer_t structure below is provided for this purpose. Its sizes * The StaticTimer_t structure below is provided for this purpose. Its sizes
* and alignment requirements are guaranteed to match those of the genuine * and alignment requirements are guaranteed to match those of the genuine
* structure, no matter which architecture is being used, and no matter how the * structure, no matter which architecture is being used, and no matter how the
@ -1316,12 +1316,12 @@ typedef struct xSTATIC_TIMER
* internally by FreeRTOS is not accessible to application code. However, if * internally by FreeRTOS is not accessible to application code. However, if
* the application writer wants to statically allocate the memory required to * the application writer wants to statically allocate the memory required to
* create a stream buffer then the size of the stream buffer object needs to be * create a stream buffer then the size of the stream buffer object needs to be
* know. The StaticStreamBuffer_t structure below is provided for this purpose. * known. The StaticStreamBuffer_t structure below is provided for this
* Its size and alignment requirements are guaranteed to match those of the * purpose. Its size and alignment requirements are guaranteed to match those
* genuine structure, no matter which architecture is being used, and no matter * of the genuine structure, no matter which architecture is being used, and
* how the values in FreeRTOSConfig.h are set. Its contents are somewhat * no matter how the values in FreeRTOSConfig.h are set. Its contents are
* obfuscated in the hope users will recognise that it would be unwise to make * somewhat obfuscated in the hope users will recognise that it would be unwise
* direct use of the structure members. * to make direct use of the structure members.
*/ */
typedef struct xSTATIC_STREAM_BUFFER typedef struct xSTATIC_STREAM_BUFFER
{ {

@ -87,7 +87,7 @@ typedef BaseType_t (* TaskHookFunction_t)( void * );
typedef enum typedef enum
{ {
eRunning = 0, /* A task is querying the state of itself, so must be running. */ eRunning = 0, /* A task is querying the state of itself, so must be running. */
eReady, /* The task being queried is in a read or pending ready list. */ eReady, /* The task being queried is in a ready or pending ready list. */
eBlocked, /* The task being queried is in the Blocked state. */ 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. */ 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. */ eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */
@ -158,7 +158,7 @@ typedef struct xTASK_STATUS
/* Possible return values for eTaskConfirmSleepModeStatus(). */ /* Possible return values for eTaskConfirmSleepModeStatus(). */
typedef enum typedef enum
{ {
eAbortSleep = 0, /* A task has been made ready or a context switch pended since portSUPPORESS_TICKS_AND_SLEEP() was called - abort entering a sleep mode. */ eAbortSleep = 0, /* A task has been made ready or a context switch pended since portSUPPRESS_TICKS_AND_SLEEP() was called - abort entering a sleep mode. */
eStandardSleep, /* Enter a sleep mode that will not last any longer than the expected idle time. */ eStandardSleep, /* Enter a sleep mode that will not last any longer than the expected idle time. */
eNoTasksWaitingTimeout /* No tasks are waiting for a timeout so it is safe to enter a sleep mode that can only be exited by an external interrupt. */ eNoTasksWaitingTimeout /* No tasks are waiting for a timeout so it is safe to enter a sleep mode that can only be exited by an external interrupt. */
} eSleepModeStatus; } eSleepModeStatus;
@ -246,12 +246,12 @@ typedef enum
* task. h * task. h
* <pre> * <pre>
* BaseType_t xTaskCreate( * BaseType_t xTaskCreate(
* TaskFunction_t pvTaskCode, * TaskFunction_t pxTaskCode,
* const char * const pcName, * const char *pcName,
* configSTACK_DEPTH_TYPE usStackDepth, * configSTACK_DEPTH_TYPE usStackDepth,
* void *pvParameters, * void *pvParameters,
* UBaseType_t uxPriority, * UBaseType_t uxPriority,
* TaskHandle_t *pvCreatedTask * TaskHandle_t *pxCreatedTask
* ); * );
* </pre> * </pre>
* *
@ -275,7 +275,7 @@ typedef enum
* support can alternatively create an MPU constrained task using * support can alternatively create an MPU constrained task using
* xTaskCreateRestricted(). * xTaskCreateRestricted().
* *
* @param pvTaskCode Pointer to the task entry function. Tasks * @param pxTaskCode Pointer to the task entry function. Tasks
* must be implemented to never return (i.e. continuous loop). * must be implemented to never return (i.e. continuous loop).
* *
* @param pcName A descriptive name for the task. This is mainly used to * @param pcName A descriptive name for the task. This is mainly used to
@ -296,7 +296,7 @@ typedef enum
* example, to create a privileged task at priority 2 the uxPriority parameter * example, to create a privileged task at priority 2 the uxPriority parameter
* should be set to ( 2 | portPRIVILEGE_BIT ). * should be set to ( 2 | portPRIVILEGE_BIT ).
* *
* @param pvCreatedTask Used to pass back a handle by which the created task * @param pxCreatedTask Used to pass back a handle by which the created task
* can be referenced. * can be referenced.
* *
* @return pdPASS if the task was successfully created and added to a ready * @return pdPASS if the task was successfully created and added to a ready
@ -348,12 +348,12 @@ typedef enum
/** /**
* task. h * task. h
* <pre> * <pre>
* TaskHandle_t xTaskCreateStatic( TaskFunction_t pvTaskCode, * TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,
* const char * const pcName, * const char *pcName,
* uint32_t ulStackDepth, * uint32_t ulStackDepth,
* void *pvParameters, * void *pvParameters,
* UBaseType_t uxPriority, * UBaseType_t uxPriority,
* StackType_t *pxStackBuffer, * StackType_t *puxStackBuffer,
* StaticTask_t *pxTaskBuffer ); * StaticTask_t *pxTaskBuffer );
* </pre> * </pre>
* *
@ -369,7 +369,7 @@ typedef enum
* memory. xTaskCreateStatic() therefore allows a task to be created without * memory. xTaskCreateStatic() therefore allows a task to be created without
* using any dynamic memory allocation. * using any dynamic memory allocation.
* *
* @param pvTaskCode Pointer to the task entry function. Tasks * @param pxTaskCode Pointer to the task entry function. Tasks
* must be implemented to never return (i.e. continuous loop). * must be implemented to never return (i.e. continuous loop).
* *
* @param pcName A descriptive name for the task. This is mainly used to * @param pcName A descriptive name for the task. This is mainly used to
@ -386,7 +386,7 @@ typedef enum
* *
* @param uxPriority The priority at which the task will run. * @param uxPriority The priority at which the task will run.
* *
* @param pxStackBuffer Must point to a StackType_t array that has at least * @param puxStackBuffer Must point to a StackType_t array that has at least
* ulStackDepth indexes - the array will then be used as the task's stack, * ulStackDepth indexes - the array will then be used as the task's stack,
* removing the need for the stack to be allocated dynamically. * removing the need for the stack to be allocated dynamically.
* *
@ -394,15 +394,15 @@ typedef enum
* then be used to hold the task's data structures, removing the need for the * then be used to hold the task's data structures, removing the need for the
* memory to be allocated dynamically. * memory to be allocated dynamically.
* *
* @return If neither pxStackBuffer or pxTaskBuffer are NULL, then the task will * @return If neither puxStackBuffer nor pxTaskBuffer are NULL, then the task
* be created and a handle to the created task is returned. If either * will be created and a handle to the created task is returned. If either
* pxStackBuffer or pxTaskBuffer are NULL then the task will not be created and * puxStackBuffer or pxTaskBuffer are NULL then the task will not be created and
* NULL is returned. * NULL is returned.
* *
* Example usage: * Example usage:
* <pre> * <pre>
* *
* // Dimensions the buffer that the task being created will use as its stack. * // Dimensions of the buffer that the task being created will use as its stack.
* // NOTE: This is the number of words the stack will hold, not the number of * // NOTE: This is the number of words the stack will hold, not the number of
* // bytes. For example, if each stack item is 32-bits, and this is set to 100, * // bytes. For example, if each stack item is 32-bits, and this is set to 100,
* // then 400 bytes (100 * 32-bits) will be allocated. * // then 400 bytes (100 * 32-bits) will be allocated.
@ -643,7 +643,7 @@ typedef enum
* *
* @param xTask The handle of the task being updated. * @param xTask The handle of the task being updated.
* *
* @param xRegions A pointer to an MemoryRegion_t structure that contains the * @param xRegions A pointer to a MemoryRegion_t structure that contains the
* new memory region definitions. * new memory region definitions.
* *
* Example usage: * Example usage:
@ -684,7 +684,7 @@ void vTaskAllocateMPURegions( TaskHandle_t xTask,
/** /**
* task. h * task. h
* <pre> * <pre>
* void vTaskDelete( TaskHandle_t xTask ); * void vTaskDelete( TaskHandle_t xTaskToDelete );
* </pre> * </pre>
* *
* INCLUDE_vTaskDelete must be defined as 1 for this function to be available. * INCLUDE_vTaskDelete must be defined as 1 for this function to be available.
@ -703,7 +703,7 @@ void vTaskAllocateMPURegions( TaskHandle_t xTask,
* See the demo application file death.c for sample code that utilises * See the demo application file death.c for sample code that utilises
* vTaskDelete (). * vTaskDelete ().
* *
* @param xTask The handle of the task to be deleted. Passing NULL will * @param xTaskToDelete The handle of the task to be deleted. Passing NULL will
* cause the calling task to be deleted. * cause the calling task to be deleted.
* *
* Example usage: * Example usage:
@ -1976,7 +1976,7 @@ uint32_t ulTaskGetIdleRunTimeCounter( void ) PRIVILEGED_FUNCTION;
* *
* eSetBits - * eSetBits -
* The target notification value is bitwise ORed with ulValue. * The target notification value is bitwise ORed with ulValue.
* xTaskNofifyIndexed() always returns pdPASS in this case. * xTaskNotifyIndexed() always returns pdPASS in this case.
* *
* eIncrement - * eIncrement -
* The target notification value is incremented. ulValue is not used and * The target notification value is incremented. ulValue is not used and
@ -2119,7 +2119,7 @@ BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify,
* value, if at all. Valid values for eAction are as follows: * value, if at all. Valid values for eAction are as follows:
* *
* eSetBits - * eSetBits -
* The task's notification value is bitwise ORed with ulValue. xTaskNofify() * The task's notification value is bitwise ORed with ulValue. xTaskNotify()
* always returns pdPASS in this case. * always returns pdPASS in this case.
* *
* eIncrement - * eIncrement -
@ -2289,7 +2289,7 @@ BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify,
* the Blocked state for a notification to be received, should a notification * the Blocked state for a notification to be received, should a notification
* not already be pending when xTaskNotifyWait() was called. The task * not already be pending when xTaskNotifyWait() was called. The task
* will not consume any processing time while it is in the Blocked state. This * will not consume any processing time while it is in the Blocked state. This
* is specified in kernel ticks, the macro pdMS_TO_TICSK( value_in_ms ) can be * is specified in kernel ticks, the macro pdMS_TO_TICKS( value_in_ms ) can be
* used to convert a time specified in milliseconds to a time specified in * used to convert a time specified in milliseconds to a time specified in
* ticks. * ticks.
* *
@ -2559,7 +2559,7 @@ void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify,
* should the count not already be greater than zero when * should the count not already be greater than zero when
* ulTaskNotifyTake() was called. The task will not consume any processing * ulTaskNotifyTake() was called. The task will not consume any processing
* time while it is in the Blocked state. This is specified in kernel ticks, * time while it is in the Blocked state. This is specified in kernel ticks,
* the macro pdMS_TO_TICSK( value_in_ms ) can be used to convert a time * the macro pdMS_TO_TICKS( value_in_ms ) can be used to convert a time
* specified in milliseconds to a time specified in ticks. * specified in milliseconds to a time specified in ticks.
* *
* @return The task's notification count before it is either cleared to zero or * @return The task's notification count before it is either cleared to zero or
@ -2738,7 +2738,7 @@ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) PRIVILEGED_FUNCTION;
* @param pxTicksToWait The number of ticks to check for timeout i.e. if * @param pxTicksToWait The number of ticks to check for timeout i.e. if
* pxTicksToWait ticks have passed since pxTimeOut was last updated (either by * pxTicksToWait ticks have passed since pxTimeOut was last updated (either by
* vTaskSetTimeOutState() or xTaskCheckForTimeOut()), the timeout has occurred. * vTaskSetTimeOutState() or xTaskCheckForTimeOut()), the timeout has occurred.
* If the timeout has not occurred, pxTIcksToWait is updated to reflect the * If the timeout has not occurred, pxTicksToWait is updated to reflect the
* number of remaining ticks. * number of remaining ticks.
* *
* @return If timeout has occurred, pdTRUE is returned. Otherwise pdFALSE is * @return If timeout has occurred, pdTRUE is returned. Otherwise pdFALSE is
@ -2875,7 +2875,7 @@ BaseType_t xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;
* xItemValue value, and inserts the list item at the end of the list. * xItemValue value, and inserts the list item at the end of the list.
* *
* The 'ordered' version uses the existing event list item value (which is the * The 'ordered' version uses the existing event list item value (which is the
* owning tasks priority) to insert the list item into the event list is task * owning task's priority) to insert the list item into the event list in task
* priority order. * priority order.
* *
* @param pxEventList The list containing tasks that are blocked waiting * @param pxEventList The list containing tasks that are blocked waiting

@ -76,7 +76,7 @@
*/ */
#define tskSTACK_FILL_BYTE ( 0xa5U ) #define tskSTACK_FILL_BYTE ( 0xa5U )
/* Bits used to recored how a task's stack and TCB were allocated. */ /* Bits used to record how a task's stack and TCB were allocated. */
#define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 0 ) #define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 0 )
#define tskSTATICALLY_ALLOCATED_STACK_ONLY ( ( uint8_t ) 1 ) #define tskSTATICALLY_ALLOCATED_STACK_ONLY ( ( uint8_t ) 1 )
#define tskSTATICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 2 ) #define tskSTATICALLY_ALLOCATED_STACK_AND_TCB ( ( uint8_t ) 2 )
@ -100,8 +100,8 @@
#define tskSUSPENDED_CHAR ( 'S' ) #define tskSUSPENDED_CHAR ( 'S' )
/* /*
* Some kernel aware debuggers require the data the debugger needs access to be * Some kernel aware debuggers require the data the debugger needs access to to
* global, rather than file scope. * be global, rather than file scope.
*/ */
#ifdef portREMOVE_STATIC_QUALIFIER #ifdef portREMOVE_STATIC_QUALIFIER
#define static #define static
@ -224,7 +224,7 @@
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* /*
* Several functions take an TaskHandle_t parameter that can optionally be NULL, * Several functions take a TaskHandle_t parameter that can optionally be NULL,
* where NULL is used to indicate that the handle of the currently executing * where NULL is used to indicate that the handle of the currently executing
* task should be used in place of the parameter. This macro simply checks to * task should be used in place of the parameter. This macro simply checks to
* see if the parameter is NULL and returns a pointer to the appropriate TCB. * see if the parameter is NULL and returns a pointer to the appropriate TCB.
@ -338,7 +338,7 @@ typedef tskTCB TCB_t;
PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL; PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
/* Lists for ready and blocked tasks. -------------------- /* Lists for ready and blocked tasks. --------------------
* xDelayedTaskList1 and xDelayedTaskList2 could be move to function scople but * xDelayedTaskList1 and xDelayedTaskList2 could be moved to function scope but
* doing so breaks some kernel aware debuggers and debuggers that rely on removing * doing so breaks some kernel aware debuggers and debuggers that rely on removing
* the static qualifier. */ * the static qualifier. */
PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ]; /*< Prioritised ready tasks. */ PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ]; /*< Prioritised ready tasks. */
@ -1660,7 +1660,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE ) if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE )
{ {
/* The task is currently in its ready list - remove before /* The task is currently in its ready list - remove before
* adding it to it's new ready list. As we are in a critical * adding it to its new ready list. As we are in a critical
* section we can do this even if the scheduler is suspended. */ * section we can do this even if the scheduler is suspended. */
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
{ {
@ -2787,7 +2787,7 @@ BaseType_t xTaskIncrementTick( void )
* state - so record the item value in * state - so record the item value in
* xNextTaskUnblockTime. */ * xNextTaskUnblockTime. */
xNextTaskUnblockTime = xItemValue; xNextTaskUnblockTime = xItemValue;
break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ break; /*lint !e9011 Code structure here is deemed easier to understand with multiple breaks. */
} }
else else
{ {

Loading…
Cancel
Save