mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-25 16:01:59 -04:00
list.c: improve code comments to point to official documentation about problems which may cause code to get stuck inside of list.c (#1051)
list.c: improve documentation about initializing binary semaphores
This commit is contained in:
parent
55eceb2203
commit
29b202a41e
13
list.c
13
list.c
|
@ -184,7 +184,14 @@ void vListInsert( List_t * const pxList,
|
||||||
* 4) Using a queue or semaphore before it has been initialised or
|
* 4) Using a queue or semaphore before it has been initialised or
|
||||||
* before the scheduler has been started (are interrupts firing
|
* before the scheduler has been started (are interrupts firing
|
||||||
* before vTaskStartScheduler() has been called?).
|
* before vTaskStartScheduler() has been called?).
|
||||||
* 5) If the FreeRTOS port supports interrupt nesting then ensure that
|
* 5) Attempting to 'take' binary semaphores created using
|
||||||
|
* `xSemaphoreCreateBinary()` or `xSemaphoreCreateBinaryStatic()`
|
||||||
|
* APIs, before 'giving' them. Binary semaphores created using
|
||||||
|
* `xSemaphoreCreateBinary()` or `xSemaphoreCreateBinaryStatic()`,
|
||||||
|
* are created in a state such that the semaphore must first be
|
||||||
|
* 'given' using xSemaphoreGive() API before it can be 'taken' using
|
||||||
|
* xSemaphoreTake() API.
|
||||||
|
* 6) If the FreeRTOS port supports interrupt nesting then ensure that
|
||||||
* the priority of the tick interrupt is at or below
|
* the priority of the tick interrupt is at or below
|
||||||
* configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
* configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
@ -192,7 +199,9 @@ void vListInsert( List_t * const pxList,
|
||||||
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
|
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
|
||||||
{
|
{
|
||||||
/* There is nothing to do here, just iterating to the wanted
|
/* There is nothing to do here, just iterating to the wanted
|
||||||
* insertion position. */
|
* insertion position.
|
||||||
|
* IF YOU FIND YOUR CODE STUCK HERE, SEE THE NOTE JUST ABOVE.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue