Skip to content

Commit ce221a8

Browse files
authored
Fix comment typos (#1461)
Fix several documentation and example-code issues in the kernel header comments: * queue.h: remove a stray semicolon after the 'if' and correct the xHigherPriorityTaskWoken variable casing in the xQueueReceiveFromISR() example; add the missing comma between parameters in the xQueueGenericSend() prototype example. * list.h: correct the doxygen \page tag for listGET_ITEM_VALUE_OF_HEAD_ENTRY. * task.h: fix the uxIndexToCLear typo (-> uxIndexToClear). These are documentation/example only changes that do not affect the compiled library. Signed-off-by: chenrongjun <chenrongjun@zepp.com>
1 parent c5d22b2 commit ce221a8

46 files changed

Lines changed: 83 additions & 83 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/template_configuration/FreeRTOSConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
/* Defines the kernel provided implementation of
578578
* vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory()
579579
* to provide the memory that is used by the Idle task and Timer task
580-
* respectively. The application can provide it's own implementation of
580+
* respectively. The application can provide its own implementation of
581581
* vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by
582582
* setting configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */
583583
#define configKERNEL_PROVIDED_STATIC_MEMORY 1

include/croutine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ void vCoRoutineSchedule( void );
528528
* functions used by tasks.
529529
*
530530
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
531-
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
531+
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
532532
* xQueueReceiveFromISR() can only be used to pass data between a task and and
533533
* ISR.
534534
*
@@ -628,7 +628,7 @@ void vCoRoutineSchedule( void );
628628
* functions used by tasks.
629629
*
630630
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
631-
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
631+
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
632632
* xQueueReceiveFromISR() can only be used to pass data between a task and and
633633
* ISR.
634634
*

include/list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* heavily for the schedulers needs, it is also available for use by
3232
* application code.
3333
*
34-
* list_ts can only store pointers to list_item_ts. Each ListItem_t contains a
34+
* List_t can only store pointers to ListItem_t. Each ListItem_t contains a
3535
* numeric value (xItemValue). Most of the time the lists are sorted in
3636
* ascending item value order.
3737
*
@@ -42,7 +42,7 @@
4242
* is because the tail contains a wrap back pointer to the true head of
4343
* the list.
4444
*
45-
* In addition to it's value, each list item contains a pointer to the next
45+
* In addition to its value, each list item contains a pointer to the next
4646
* item in the list (pxNext), a pointer to the list it is in (pxContainer)
4747
* and a pointer back to the object that contains it. These later two
4848
* pointers are included for efficiency of list manipulation. There is
@@ -74,7 +74,7 @@
7474
* compiler's options were set for maximum optimisation has been inspected and
7575
* deemed to be as intended. That said, as compiler technology advances, and
7676
* especially if aggressive cross module optimisation is used (a use case that
77-
* has not been exercised to any great extend) then it is feasible that the
77+
* has not been exercised to any great extent) then it is feasible that the
7878
* volatile qualifier will be needed for correct optimisation. It is expected
7979
* that a compiler removing essential code because, without the volatile
8080
* qualifier on the list structure members and with aggressive cross module
@@ -219,7 +219,7 @@ typedef struct xLIST
219219
* Access macro to retrieve the value of the list item at the head of a given
220220
* list.
221221
*
222-
* \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
222+
* \page listGET_ITEM_VALUE_OF_HEAD_ENTRY listGET_ITEM_VALUE_OF_HEAD_ENTRY
223223
* \ingroup LinkedList
224224
*/
225225
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue )

include/queue.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
/**
4646
* Type by which queues are referenced. For example, a call to xQueueCreate()
47-
* returns an QueueHandle_t variable that can then be used as a parameter to
47+
* returns a QueueHandle_t variable that can then be used as a parameter to
4848
* xQueueSend(), xQueueReceive(), etc.
4949
*/
5050
struct QueueDefinition; /* Using old naming convention so as not to break kernel aware debuggers. */
@@ -60,7 +60,7 @@ typedef struct QueueDefinition * QueueSetHandle_t;
6060
/**
6161
* Queue sets can contain both queues and semaphores, so the
6262
* QueueSetMemberHandle_t is defined as a type to be used where a parameter or
63-
* return value can be either an QueueHandle_t or an SemaphoreHandle_t.
63+
* return value can be either a QueueHandle_t or a SemaphoreHandle_t.
6464
*/
6565
typedef struct QueueDefinition * QueueSetMemberHandle_t;
6666

@@ -185,7 +185,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
185185
* @param pucQueueStorage If uxItemSize is not zero then
186186
* pucQueueStorage must point to a uint8_t array that is at least large
187187
* enough to hold the maximum number of items that can be in the queue at any
188-
* one time - which is ( uxQueueLength * uxItemsSize ) bytes. If uxItemSize is
188+
* one time - which is ( uxQueueLength * uxItemSize ) bytes. If uxItemSize is
189189
* zero then pucQueueStorage can be NULL.
190190
*
191191
* @param pxQueueBuffer Must point to a variable of type StaticQueue_t, which
@@ -604,7 +604,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
604604
* BaseType_t xQueueGenericSend(
605605
* QueueHandle_t xQueue,
606606
* const void * pvItemToQueue,
607-
* TickType_t xTicksToWait
607+
* TickType_t xTicksToWait,
608608
* BaseType_t xCopyPosition
609609
* );
610610
* @endcode
@@ -1189,7 +1189,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
11891189
*
11901190
* // ...
11911191
*
1192-
* if( xHigherPrioritytaskWoken == pdTRUE )
1192+
* if( xHigherPriorityTaskWoken == pdTRUE )
11931193
* {
11941194
* // Writing to the queue caused a task to unblock and the unblocked task
11951195
* // has a priority higher than or equal to the priority of the currently
@@ -1451,7 +1451,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
14511451
* // task will be woken.
14521452
* }
14531453
*
1454-
* if( xHigherPrioritytaskWoken == pdTRUE );
1454+
* if( xHigherPriorityTaskWoken == pdTRUE )
14551455
* {
14561456
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
14571457
* // switch should be requested. The macro used is port specific and
@@ -1664,7 +1664,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
16641664
* Note 2: Blocking on a queue set that contains a mutex will not cause the
16651665
* mutex holder to inherit the priority of the blocked task.
16661666
*
1667-
* Note 3: An additional 4 bytes of RAM is required for each space in a every
1667+
* Note 3: An additional 4 bytes of RAM is required for each space in every
16681668
* queue added to a queue set. Therefore counting semaphores that have a high
16691669
* maximum count value should not be added to a queue set.
16701670
*
@@ -1716,7 +1716,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17161716
* Note 2: Blocking on a queue set that contains a mutex will not cause the
17171717
* mutex holder to inherit the priority of the blocked task.
17181718
*
1719-
* Note 3: An additional 4 bytes of RAM is required for each space in a every
1719+
* Note 3: An additional 4 bytes of RAM is required for each space in every
17201720
* queue added to a queue set. Therefore counting semaphores that have a high
17211721
* maximum count value should not be added to a queue set.
17221722
*
@@ -1767,7 +1767,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17671767
* a call to xQueueSelectFromSet() has first returned a handle to that set member.
17681768
*
17691769
* @param xQueueOrSemaphore The handle of the queue or semaphore being added to
1770-
* the queue set (cast to an QueueSetMemberHandle_t type).
1770+
* the queue set (cast to a QueueSetMemberHandle_t type).
17711771
*
17721772
* @param xQueueSet The handle of the queue set to which the queue or semaphore
17731773
* is being added.
@@ -1790,7 +1790,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
17901790
* function.
17911791
*
17921792
* @param xQueueOrSemaphore The handle of the queue or semaphore being removed
1793-
* from the queue set (cast to an QueueSetMemberHandle_t type).
1793+
* from the queue set (cast to a QueueSetMemberHandle_t type).
17941794
*
17951795
* @param xQueueSet The handle of the queue set in which the queue or semaphore
17961796
* is included.
@@ -1836,7 +1836,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
18361836
* a QueueSetMemberHandle_t type) contained in the queue set that contains data,
18371837
* or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained
18381838
* in the queue set that is available, or NULL if no such queue or semaphore
1839-
* exists before before the specified block time expires.
1839+
* exists before the specified block time expires.
18401840
*/
18411841
#if ( configUSE_QUEUE_SETS == 1 )
18421842
QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet,

include/task.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
* task. h
9090
*
9191
* Type by which tasks are referenced. For example, a call to xTaskCreate
92-
* returns (via a pointer parameter) an TaskHandle_t variable that can then
92+
* returns (via a pointer parameter) a TaskHandle_t variable that can then
9393
* be used as a parameter to vTaskDelete to delete the task.
9494
*
9595
* \defgroup TaskHandle_t TaskHandle_t
@@ -579,7 +579,7 @@ typedef enum
579579
*
580580
* Example usage:
581581
* @code{c}
582-
* // Create an TaskParameters_t structure that defines the task to be created.
582+
* // Create a TaskParameters_t structure that defines the task to be created.
583583
* static const TaskParameters_t xCheckTaskParameters =
584584
* {
585585
* vATask, // pvTaskCode - the function that implements the task.
@@ -677,7 +677,7 @@ typedef enum
677677
*
678678
* Example usage:
679679
* @code{c}
680-
* // Create an TaskParameters_t structure that defines the task to be created.
680+
* // Create a TaskParameters_t structure that defines the task to be created.
681681
* // The StaticTask_t variable is only included in the structure when
682682
* // configSUPPORT_STATIC_ALLOCATION is set to 1. The PRIVILEGED_DATA macro can
683683
* // be used to force the variable into the RTOS kernel's privileged data area.
@@ -1075,7 +1075,7 @@ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime,
10751075
* // it itself.
10761076
* if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY )
10771077
* {
1078-
* // The task has changed it's priority.
1078+
* // The task has changed its priority.
10791079
* }
10801080
*
10811081
* // ...
@@ -2157,7 +2157,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
21572157
* configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for
21582158
* uxTaskGetSystemState() to be available.
21592159
*
2160-
* uxTaskGetSystemState() populates an TaskStatus_t structure for each task in
2160+
* uxTaskGetSystemState() populates a TaskStatus_t structure for each task in
21612161
* the system. TaskStatus_t structures contain, among other things, members
21622162
* for the task handle, task name, task priority, task state, and total amount
21632163
* of run time consumed by the task. See the TaskStatus_t structure
@@ -3307,7 +3307,7 @@ uint32_t ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn,
33073307
/**
33083308
* task. h
33093309
* @code{c}
3310-
* BaseType_t xTaskNotifyStateClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToCLear );
3310+
* BaseType_t xTaskNotifyStateClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToClear );
33113311
*
33123312
* BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );
33133313
* @endcode

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
" restore_general_regs_first_task: \n"
127127
" subs r2, #32 \n"
128128
" ldmia r2!, {r4-r7} \n" /* r4-r7 contain half of the hardware saved context. */
129-
" stmia r3!, {r4-r7} \n" /* Copy half of the the hardware saved context on the task stack. */
129+
" stmia r3!, {r4-r7} \n" /* Copy half of the hardware saved context on the task stack. */
130130
" ldmia r2!, {r4-r7} \n" /* r4-r7 contain rest half of the hardware saved context. */
131-
" stmia r3!, {r4-r7} \n" /* Copy rest half of the the hardware saved context on the task stack. */
131+
" stmia r3!, {r4-r7} \n" /* Copy rest half of the hardware saved context on the task stack. */
132132
" subs r2, #48 \n"
133133
" ldmia r2!, {r4-r7} \n" /* Restore r8-r11. */
134134
" mov r8, r4 \n" /* r8 = r4. */
@@ -402,9 +402,9 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
402402
" restore_general_regs: \n"
403403
" subs r2, #32 \n"
404404
" ldmia r2!, {r4-r7} \n" /* r4-r7 contain half of the hardware saved context. */
405-
" stmia r3!, {r4-r7} \n" /* Copy half of the the hardware saved context on the task stack. */
405+
" stmia r3!, {r4-r7} \n" /* Copy half of the hardware saved context on the task stack. */
406406
" ldmia r2!, {r4-r7} \n" /* r4-r7 contain rest half of the hardware saved context. */
407-
" stmia r3!, {r4-r7} \n" /* Copy rest half of the the hardware saved context on the task stack. */
407+
" stmia r3!, {r4-r7} \n" /* Copy rest half of the hardware saved context on the task stack. */
408408
" subs r2, #48 \n"
409409
" ldmia r2!, {r4-r7} \n" /* Restore r8-r11. */
410410
" mov r8, r4 \n" /* r8 = r4. */

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@
121121
" restore_general_regs_first_task: \n"
122122
" subs r1, #32 \n"
123123
" ldmia r1!, {r4-r7} \n" /* r4-r7 contain half of the hardware saved context. */
124-
" stmia r2!, {r4-r7} \n" /* Copy half of the the hardware saved context on the task stack. */
124+
" stmia r2!, {r4-r7} \n" /* Copy half of the hardware saved context on the task stack. */
125125
" ldmia r1!, {r4-r7} \n" /* r4-r7 contain rest half of the hardware saved context. */
126-
" stmia r2!, {r4-r7} \n" /* Copy rest half of the the hardware saved context on the task stack. */
126+
" stmia r2!, {r4-r7} \n" /* Copy rest half of the hardware saved context on the task stack. */
127127
" subs r1, #48 \n"
128128
" ldmia r1!, {r4-r7} \n" /* Restore r8-r11. */
129129
" mov r8, r4 \n" /* r8 = r4. */
@@ -375,9 +375,9 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
375375
" restore_general_regs: \n"
376376
" subs r1, #32 \n"
377377
" ldmia r1!, {r4-r7} \n" /* r4-r7 contain half of the hardware saved context. */
378-
" stmia r2!, {r4-r7} \n" /* Copy half of the the hardware saved context on the task stack. */
378+
" stmia r2!, {r4-r7} \n" /* Copy half of the hardware saved context on the task stack. */
379379
" ldmia r1!, {r4-r7} \n" /* r4-r7 contain rest half of the hardware saved context. */
380-
" stmia r2!, {r4-r7} \n" /* Copy rest half of the the hardware saved context on the task stack. */
380+
" stmia r2!, {r4-r7} \n" /* Copy rest half of the hardware saved context on the task stack. */
381381
" subs r1, #48 \n"
382382
" ldmia r1!, {r4-r7} \n" /* Restore r8-r11. */
383383
" mov r8, r4 \n" /* r8 = r4. */

portable/ARMv8M/secure/context/secure_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ secureportNON_SECURE_CALLABLE void SecureContext_SaveContext( SecureContextHandl
349349

350350
secureportREAD_PSPLIM( pucStackLimit );
351351

352-
/* Ensure that task's context is loaded and the task is saving it's own
352+
/* Ensure that task's context is loaded and the task is saving its own
353353
* context. */
354354
if( ( xSecureContexts[ ulSecureContextIndex ].pucStackLimit == pucStackLimit ) &&
355355
( xSecureContexts[ ulSecureContextIndex ].pvTaskHandle == pvTaskHandle ) )

portable/CodeWarrior/HCS12/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ scheduler startup function. */
6363
/* Calls to portENTER_CRITICAL() can be nested. When they are nested the
6464
critical section should not be left (i.e. interrupts should not be re-enabled)
6565
until the nesting depth reaches 0. This variable simply tracks the nesting
66-
depth. Each task maintains it's own critical nesting depth variable so
66+
depth. Each task maintains its own critical nesting depth variable so
6767
uxCriticalNesting is saved and restored from the task stack during a context
6868
switch. */
6969
volatile UBaseType_t uxCriticalNesting = 0xff;

portable/GCC/ARM_CM0/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ static void prvTaskExitError( void )
689689
}
690690

691691
/* Shift the code by one before returning so it can be written directly
692-
* into the the correct bit position of the attribute register. */
692+
* into the correct bit position of the attribute register. */
693693
return( ulReturnValue << 1UL );
694694
}
695695

0 commit comments

Comments
 (0)