mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-28 05:58:36 -04:00
Added xTaskAbortDelayFromISR() and ulTaskNotifyValueClear() API functions.
Added tests for xTaskAbortDelayFromISR() into Demo/Common/Minimal/AbortDelay.c. Added tests for ulTaskNotifyValueClear() into Demo/Common/Minimal/TaskNotify.c.
This commit is contained in:
parent
0a29d350b1
commit
be3561ed53
9 changed files with 336 additions and 27 deletions
|
@ -76,6 +76,7 @@ BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue,
|
|||
BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
|
||||
uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
|
||||
BaseType_t MPU_xTaskNotifyStateClear( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
|
||||
uint32_t MPU_ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ) FREERTOS_SYSTEM_CALL;
|
||||
BaseType_t MPU_xTaskIncrementTick( void ) FREERTOS_SYSTEM_CALL;
|
||||
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) FREERTOS_SYSTEM_CALL;
|
||||
void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) FREERTOS_SYSTEM_CALL;
|
||||
|
|
|
@ -82,6 +82,7 @@ only for ports that are using the MPU. */
|
|||
#define xTaskNotifyWait MPU_xTaskNotifyWait
|
||||
#define ulTaskNotifyTake MPU_ulTaskNotifyTake
|
||||
#define xTaskNotifyStateClear MPU_xTaskNotifyStateClear
|
||||
#define ulTaskNotifyValueClear MPU_ulTaskNotifyValueClear
|
||||
#define xTaskCatchUpTicks MPU_xTaskCatchUpTicks
|
||||
|
||||
#define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
|
||||
|
|
|
@ -841,6 +841,39 @@ void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xT
|
|||
*/
|
||||
BaseType_t xTaskAbortDelay( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <pre>BaseType_t xTaskAbortDelayFromISR( TaskHandle_t xTask, BaseType_t * const pxHigherPriorityTaskWoken )</pre>
|
||||
*
|
||||
* INCLUDE_xTaskAbortDelay must be defined as 1 in FreeRTOSConfig.h for this
|
||||
* function to be available.
|
||||
*
|
||||
* A version of xTaskAbortDelay() that can be used from an interrupt service routine.
|
||||
*
|
||||
* A task will enter the Blocked state when it is waiting for an event. The
|
||||
* event it is waiting for can be a temporal event (waiting for a time), such
|
||||
* as when vTaskDelay() is called, or an event on an object, such as when
|
||||
* xQueueReceive() or ulTaskNotifyTake() is called. If the handle of a task
|
||||
* that is in the Blocked state is used in a call to xTaskAbortDelay() then the
|
||||
* task will leave the Blocked state, and return from whichever function call
|
||||
* placed the task into the Blocked state.
|
||||
*
|
||||
* @param xTask The handle of the task to remove from the Blocked state.
|
||||
*
|
||||
* @param pxHigherPriorityTaskWoken xTaskAbortDelayFromISR() will set
|
||||
* *pxHigherPriorityTaskWoken to pdTRUE if a task was removed from the Blocked state,
|
||||
* and the task that was removed from the Blocked state has a priority higher than the
|
||||
* currently running task. If xTaskAbortDelayFromISR() sets this value to pdTRUE then
|
||||
* a context switch should be requested before the interrupt is exited.
|
||||
*
|
||||
* @return If the task referenced by xTask was not in the Blocked state then
|
||||
* pdFAIL is returned. Otherwise pdPASS is returned.
|
||||
*
|
||||
* \defgroup xTaskAbortDelay xTaskAbortDelayFromISR
|
||||
* \ingroup TaskCtrl
|
||||
*/
|
||||
BaseType_t xTaskAbortDelayFromISR( TaskHandle_t xTask, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <pre>UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask );</pre>
|
||||
|
@ -2201,6 +2234,24 @@ uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait
|
|||
*/
|
||||
BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear );</pre>
|
||||
*
|
||||
* Clears the bits specified by the ulBitsToClear bit mask in the notification
|
||||
* value of the task referenced by xTask.
|
||||
*
|
||||
* Set ulBitsToClear to to 0xffffffff (UINT_MAX on 32-bit architectures) to clear
|
||||
* the notification value to 0. Set ulBitsToClear to 0 to query the task's
|
||||
* notification value without clearing any bits.
|
||||
*
|
||||
* @return The value of the target task's notification value before the bits
|
||||
* specified by ulBitsToClear were cleared.
|
||||
* \defgroup ulTaskNotifyValueClear ulTaskNotifyValueClear
|
||||
* \ingroup TaskNotifications
|
||||
*/
|
||||
uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* <pre>void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut )</pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue