mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-10-10 08:02:57 -04:00
Merge branch 'main' into rename_frequency_to_period
This commit is contained in:
commit
fff456cc42
81 changed files with 2154 additions and 922 deletions
|
|
@ -1770,6 +1770,14 @@
|
|||
#define traceRETURN_vTaskDelete()
|
||||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskPeriodicDelay
|
||||
#define traceENTER_xTaskPeriodicDelay( pxPreviousWakeTime, xTimeIncrement )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskPeriodicDelay
|
||||
#define traceRETURN_xTaskPeriodicDelay( xIncrements )
|
||||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskDelayUntil
|
||||
#define traceENTER_xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement )
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ void vCoRoutineSchedule( void );
|
|||
* functions used by tasks.
|
||||
*
|
||||
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
|
||||
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
|
||||
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
|
||||
* xQueueReceiveFromISR() can only be used to pass data between a task and and
|
||||
* ISR.
|
||||
*
|
||||
|
|
@ -628,7 +628,7 @@ void vCoRoutineSchedule( void );
|
|||
* functions used by tasks.
|
||||
*
|
||||
* crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to
|
||||
* pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and
|
||||
* pass data between a co-routine and ISR, whereas xQueueSendFromISR() and
|
||||
* xQueueReceiveFromISR() can only be used to pass data between a task and and
|
||||
* ISR.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* heavily for the schedulers needs, it is also available for use by
|
||||
* application code.
|
||||
*
|
||||
* list_ts can only store pointers to list_item_ts. Each ListItem_t contains a
|
||||
* List_t can only store pointers to ListItem_t. Each ListItem_t contains a
|
||||
* numeric value (xItemValue). Most of the time the lists are sorted in
|
||||
* ascending item value order.
|
||||
*
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
* is because the tail contains a wrap back pointer to the true head of
|
||||
* the list.
|
||||
*
|
||||
* In addition to it's value, each list item contains a pointer to the next
|
||||
* In addition to its value, each list item contains a pointer to the next
|
||||
* item in the list (pxNext), a pointer to the list it is in (pxContainer)
|
||||
* and a pointer back to the object that contains it. These later two
|
||||
* pointers are included for efficiency of list manipulation. There is
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
* compiler's options were set for maximum optimisation has been inspected and
|
||||
* deemed to be as intended. That said, as compiler technology advances, and
|
||||
* especially if aggressive cross module optimisation is used (a use case that
|
||||
* has not been exercised to any great extend) then it is feasible that the
|
||||
* has not been exercised to any great extent) then it is feasible that the
|
||||
* volatile qualifier will be needed for correct optimisation. It is expected
|
||||
* that a compiler removing essential code because, without the volatile
|
||||
* qualifier on the list structure members and with aggressive cross module
|
||||
|
|
@ -219,7 +219,7 @@ typedef struct xLIST
|
|||
* Access macro to retrieve the value of the list item at the head of a given
|
||||
* list.
|
||||
*
|
||||
* \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
|
||||
* \page listGET_ITEM_VALUE_OF_HEAD_ENTRY listGET_ITEM_VALUE_OF_HEAD_ENTRY
|
||||
* \ingroup LinkedList
|
||||
*/
|
||||
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue )
|
||||
|
|
|
|||
|
|
@ -286,9 +286,17 @@
|
|||
|
||||
#else /* portUSING_MPU_WRAPPERS */
|
||||
|
||||
#define PRIVILEGED_FUNCTION
|
||||
#define PRIVILEGED_DATA
|
||||
#define FREERTOS_SYSTEM_CALL
|
||||
#ifndef PRIVILEGED_FUNCTION
|
||||
#define PRIVILEGED_FUNCTION
|
||||
#endif
|
||||
|
||||
#ifndef PRIVILEGED_DATA
|
||||
#define PRIVILEGED_DATA
|
||||
#endif
|
||||
|
||||
#ifndef FREERTOS_SYSTEM_CALL
|
||||
#define FREERTOS_SYSTEM_CALL
|
||||
#endif
|
||||
|
||||
#endif /* portUSING_MPU_WRAPPERS */
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
/**
|
||||
* Type by which queues are referenced. For example, a call to xQueueCreate()
|
||||
* returns an QueueHandle_t variable that can then be used as a parameter to
|
||||
* returns a QueueHandle_t variable that can then be used as a parameter to
|
||||
* xQueueSend(), xQueueReceive(), etc.
|
||||
*/
|
||||
struct QueueDefinition; /* Using old naming convention so as not to break kernel aware debuggers. */
|
||||
|
|
@ -60,7 +60,7 @@ typedef struct QueueDefinition * QueueSetHandle_t;
|
|||
/**
|
||||
* Queue sets can contain both queues and semaphores, so the
|
||||
* QueueSetMemberHandle_t is defined as a type to be used where a parameter or
|
||||
* return value can be either an QueueHandle_t or an SemaphoreHandle_t.
|
||||
* return value can be either a QueueHandle_t or a SemaphoreHandle_t.
|
||||
*/
|
||||
typedef struct QueueDefinition * QueueSetMemberHandle_t;
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
|
|||
* @param pucQueueStorage If uxItemSize is not zero then
|
||||
* pucQueueStorage must point to a uint8_t array that is at least large
|
||||
* enough to hold the maximum number of items that can be in the queue at any
|
||||
* one time - which is ( uxQueueLength * uxItemsSize ) bytes. If uxItemSize is
|
||||
* one time - which is ( uxQueueLength * uxItemSize ) bytes. If uxItemSize is
|
||||
* zero then pucQueueStorage can be NULL.
|
||||
*
|
||||
* @param pxQueueBuffer Must point to a variable of type StaticQueue_t, which
|
||||
|
|
@ -604,7 +604,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
|
|||
* BaseType_t xQueueGenericSend(
|
||||
* QueueHandle_t xQueue,
|
||||
* const void * pvItemToQueue,
|
||||
* TickType_t xTicksToWait
|
||||
* TickType_t xTicksToWait,
|
||||
* BaseType_t xCopyPosition
|
||||
* );
|
||||
* @endcode
|
||||
|
|
@ -1189,7 +1189,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
|||
*
|
||||
* // ...
|
||||
*
|
||||
* if( xHigherPrioritytaskWoken == pdTRUE )
|
||||
* if( xHigherPriorityTaskWoken == pdTRUE )
|
||||
* {
|
||||
* // Writing to the queue caused a task to unblock and the unblocked task
|
||||
* // has a priority higher than or equal to the priority of the currently
|
||||
|
|
@ -1451,7 +1451,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
* // task will be woken.
|
||||
* }
|
||||
*
|
||||
* if( xHigherPrioritytaskWoken == pdTRUE );
|
||||
* if( xHigherPriorityTaskWoken == pdTRUE )
|
||||
* {
|
||||
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
|
||||
* // switch should be requested. The macro used is port specific and
|
||||
|
|
@ -1664,7 +1664,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* Note 2: Blocking on a queue set that contains a mutex will not cause the
|
||||
* mutex holder to inherit the priority of the blocked task.
|
||||
*
|
||||
* Note 3: An additional 4 bytes of RAM is required for each space in a every
|
||||
* Note 3: An additional 4 bytes of RAM is required for each space in every
|
||||
* queue added to a queue set. Therefore counting semaphores that have a high
|
||||
* maximum count value should not be added to a queue set.
|
||||
*
|
||||
|
|
@ -1716,7 +1716,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* Note 2: Blocking on a queue set that contains a mutex will not cause the
|
||||
* mutex holder to inherit the priority of the blocked task.
|
||||
*
|
||||
* Note 3: An additional 4 bytes of RAM is required for each space in a every
|
||||
* Note 3: An additional 4 bytes of RAM is required for each space in every
|
||||
* queue added to a queue set. Therefore counting semaphores that have a high
|
||||
* maximum count value should not be added to a queue set.
|
||||
*
|
||||
|
|
@ -1767,7 +1767,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* a call to xQueueSelectFromSet() has first returned a handle to that set member.
|
||||
*
|
||||
* @param xQueueOrSemaphore The handle of the queue or semaphore being added to
|
||||
* the queue set (cast to an QueueSetMemberHandle_t type).
|
||||
* the queue set (cast to a QueueSetMemberHandle_t type).
|
||||
*
|
||||
* @param xQueueSet The handle of the queue set to which the queue or semaphore
|
||||
* is being added.
|
||||
|
|
@ -1790,7 +1790,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* function.
|
||||
*
|
||||
* @param xQueueOrSemaphore The handle of the queue or semaphore being removed
|
||||
* from the queue set (cast to an QueueSetMemberHandle_t type).
|
||||
* from the queue set (cast to a QueueSetMemberHandle_t type).
|
||||
*
|
||||
* @param xQueueSet The handle of the queue set in which the queue or semaphore
|
||||
* is included.
|
||||
|
|
@ -1836,7 +1836,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* a QueueSetMemberHandle_t type) contained in the queue set that contains data,
|
||||
* or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained
|
||||
* in the queue set that is available, or NULL if no such queue or semaphore
|
||||
* exists before before the specified block time expires.
|
||||
* exists before the specified block time expires.
|
||||
*/
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet,
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
* task. h
|
||||
*
|
||||
* Type by which tasks are referenced. For example, a call to xTaskCreate
|
||||
* returns (via a pointer parameter) an TaskHandle_t variable that can then
|
||||
* returns (via a pointer parameter) a TaskHandle_t variable that can then
|
||||
* be used as a parameter to vTaskDelete to delete the task.
|
||||
*
|
||||
* \defgroup TaskHandle_t TaskHandle_t
|
||||
|
|
@ -579,7 +579,7 @@ typedef enum
|
|||
*
|
||||
* Example usage:
|
||||
* @code{c}
|
||||
* // Create an TaskParameters_t structure that defines the task to be created.
|
||||
* // Create a TaskParameters_t structure that defines the task to be created.
|
||||
* static const TaskParameters_t xCheckTaskParameters =
|
||||
* {
|
||||
* vATask, // pvTaskCode - the function that implements the task.
|
||||
|
|
@ -677,7 +677,7 @@ typedef enum
|
|||
*
|
||||
* Example usage:
|
||||
* @code{c}
|
||||
* // Create an TaskParameters_t structure that defines the task to be created.
|
||||
* // Create a TaskParameters_t structure that defines the task to be created.
|
||||
* // The StaticTask_t variable is only included in the structure when
|
||||
* // configSUPPORT_STATIC_ALLOCATION is set to 1. The PRIVILEGED_DATA macro can
|
||||
* // be used to force the variable into the RTOS kernel's privileged data area.
|
||||
|
|
@ -893,6 +893,43 @@ void vTaskDelete( TaskHandle_t xTaskToDelete ) PRIVILEGED_FUNCTION;
|
|||
*/
|
||||
void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* @code{c}
|
||||
* TickType_t xTaskPeriodicDelay( TickType_t *pxPreviousWakeTime, const TickType_t xTimeIncrement );
|
||||
* @endcode
|
||||
*
|
||||
* INCLUDE_xTaskDelayUntil must be defined as 1 for this function to be available.
|
||||
* See the configuration section for more information.
|
||||
*
|
||||
* Periodic task delay to ensure a constant execution frequency.
|
||||
*
|
||||
* This function is similar to xTaskDelayUntil () with a few important differences:
|
||||
* - pxPreviousWakeTime contains the last past wake time, so it never runs away
|
||||
* - if you suspend the task, when you resume it pxPreviousWakeTime will instantly
|
||||
* catch up all skipped increments
|
||||
* - it returns the number of increments added to pxPreviosWakeTime
|
||||
*
|
||||
* @param pxPreviousWakeTime Pointer to a variable that holds the time at which the
|
||||
* task was last unblocked. The variable must be initialised with the current time
|
||||
* prior to its first use. Following this the variable is automatically updated.
|
||||
*
|
||||
* @param xTimeIncrement The cycle time period. The task will be unblocked at
|
||||
* time *pxPreviousWakeTime + xTimeIncrement. Passing the same xTimeIncrement
|
||||
* parameter value will cause the task to execute with a fixed interval.
|
||||
*
|
||||
* @return Number of times xTimeIncrement has been added to pxPreviousWakeTime.
|
||||
* It is 0 on the first call or if not enough ticks have been elapsed since the
|
||||
* last call, 1 in normal circumstances or more than 1 if some period has been
|
||||
* skipped for some reason (e.g. when the caller task is suspended for more than
|
||||
* xTimeIncrement ticks).
|
||||
*
|
||||
* \defgroup xTaskPeriodicDelay xTaskPeriodicDelay
|
||||
* \ingroup TaskCtrl
|
||||
*/
|
||||
TickType_t xTaskPeriodicDelay( TickType_t * const pxPreviousWakeTime,
|
||||
const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* @code{c}
|
||||
|
|
@ -1038,7 +1075,7 @@ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime,
|
|||
* // it itself.
|
||||
* if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY )
|
||||
* {
|
||||
* // The task has changed it's priority.
|
||||
* // The task has changed its priority.
|
||||
* }
|
||||
*
|
||||
* // ...
|
||||
|
|
@ -2120,7 +2157,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
|
|||
* configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for
|
||||
* uxTaskGetSystemState() to be available.
|
||||
*
|
||||
* uxTaskGetSystemState() populates an TaskStatus_t structure for each task in
|
||||
* uxTaskGetSystemState() populates a TaskStatus_t structure for each task in
|
||||
* the system. TaskStatus_t structures contain, among other things, members
|
||||
* for the task handle, task name, task priority, task state, and total amount
|
||||
* of run time consumed by the task. See the TaskStatus_t structure
|
||||
|
|
@ -3270,7 +3307,7 @@ uint32_t ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn,
|
|||
/**
|
||||
* task. h
|
||||
* @code{c}
|
||||
* BaseType_t xTaskNotifyStateClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToCLear );
|
||||
* BaseType_t xTaskNotifyStateClearIndexed( TaskHandle_t xTask, UBaseType_t uxIndexToClear );
|
||||
*
|
||||
* BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );
|
||||
* @endcode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue