|
84 | 84 | * \ingroup Tasks
|
85 | 85 | */
|
86 | 86 | struct tskTaskControlBlock; /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
87 |
| -typedef struct tskTaskControlBlock * TaskHandle_t; |
| 87 | +typedef struct tskTaskControlBlock * TaskHandle_t; |
| 88 | +typedef const struct tskTaskControlBlock * ConstTaskHandle_t; |
88 | 89 |
|
89 | 90 | /*
|
90 | 91 | * Defines the prototype to which the application task hook function must
|
@@ -193,7 +194,7 @@ typedef enum
|
193 | 194 | *
|
194 | 195 | * \ingroup TaskUtils
|
195 | 196 | */
|
196 |
| -#define tskNO_AFFINITY ( ( UBaseType_t ) -1U ) |
| 197 | +#define tskNO_AFFINITY ( ( UBaseType_t ) -1 ) |
197 | 198 |
|
198 | 199 | /**
|
199 | 200 | * task. h
|
@@ -271,7 +272,7 @@ typedef enum
|
271 | 272 | #define taskSCHEDULER_RUNNING ( ( BaseType_t ) 2 )
|
272 | 273 |
|
273 | 274 | /* Checks if core ID is valid. */
|
274 |
| -#define taskVALID_CORE_ID( xCoreID ) ( ( BaseType_t ) ( ( 0 <= xCoreID ) && ( xCoreID < configNUMBER_OF_CORES ) ) ) |
| 275 | +#define taskVALID_CORE_ID( xCoreID ) ( ( ( ( ( BaseType_t ) 0 <= ( xCoreID ) ) && ( ( xCoreID ) < ( BaseType_t ) configNUMBER_OF_CORES ) ) ) ? ( pdTRUE ) : ( pdFALSE ) ) |
275 | 276 |
|
276 | 277 | /*-----------------------------------------------------------
|
277 | 278 | * TASK CREATION API
|
@@ -746,7 +747,7 @@ typedef enum
|
746 | 747 | * \defgroup vTaskAllocateMPURegions vTaskAllocateMPURegions
|
747 | 748 | * \ingroup Tasks
|
748 | 749 | */
|
749 |
| -void vTaskAllocateMPURegions( TaskHandle_t xTask, |
| 750 | +void vTaskAllocateMPURegions( TaskHandle_t xTaskToModify, |
750 | 751 | const MemoryRegion_t * const pxRegions ) PRIVILEGED_FUNCTION;
|
751 | 752 |
|
752 | 753 | /**
|
@@ -1363,7 +1364,7 @@ BaseType_t xTaskResumeFromISR( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;
|
1363 | 1364 | * }
|
1364 | 1365 | * }
|
1365 | 1366 | */
|
1366 |
| - UBaseType_t vTaskCoreAffinityGet( const TaskHandle_t xTask ); |
| 1367 | + UBaseType_t vTaskCoreAffinityGet( ConstTaskHandle_t xTask ); |
1367 | 1368 | #endif
|
1368 | 1369 |
|
1369 | 1370 | #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
@@ -3418,6 +3419,42 @@ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) PRIVILEGED_FUNC
|
3418 | 3419 | */
|
3419 | 3420 | void vTaskYieldWithinAPI( void );
|
3420 | 3421 |
|
| 3422 | +/* |
| 3423 | + * This function is only intended for use when implementing a port of the scheduler |
| 3424 | + * and is only available when portCRITICAL_NESTING_IN_TCB is set to 1 or configNUMBER_OF_CORES |
| 3425 | + * is greater than 1. This function can be used in the implementation of portENTER_CRITICAL |
| 3426 | + * if port wants to maintain critical nesting count in TCB in single core FreeRTOS. |
| 3427 | + * It should be used in the implementation of portENTER_CRITICAL if port is running a |
| 3428 | + * multiple core FreeRTOS. |
| 3429 | + */ |
| 3430 | +void vTaskEnterCritical( void ); |
| 3431 | + |
| 3432 | +/* |
| 3433 | + * This function is only intended for use when implementing a port of the scheduler |
| 3434 | + * and is only available when portCRITICAL_NESTING_IN_TCB is set to 1 or configNUMBER_OF_CORES |
| 3435 | + * is greater than 1. This function can be used in the implementation of portEXIT_CRITICAL |
| 3436 | + * if port wants to maintain critical nesting count in TCB in single core FreeRTOS. |
| 3437 | + * It should be used in the implementation of portEXIT_CRITICAL if port is running a |
| 3438 | + * multiple core FreeRTOS. |
| 3439 | + */ |
| 3440 | +void vTaskExitCritical( void ); |
| 3441 | + |
| 3442 | +/* |
| 3443 | + * This function is only intended for use when implementing a port of the scheduler |
| 3444 | + * and is only available when configNUMBER_OF_CORES is greater than 1. This function |
| 3445 | + * should be used in the implementation of portENTER_CRITICAL_FROM_ISR if port is |
| 3446 | + * running a multiple core FreeRTOS. |
| 3447 | + */ |
| 3448 | +portBASE_TYPE vTaskEnterCriticalFromISR( void ); |
| 3449 | + |
| 3450 | +/* |
| 3451 | + * This function is only intended for use when implementing a port of the scheduler |
| 3452 | + * and is only available when configNUMBER_OF_CORES is greater than 1. This function |
| 3453 | + * should be used in the implementation of portEXIT_CRITICAL_FROM_ISR if port is |
| 3454 | + * running a multiple core FreeRTOS. |
| 3455 | + */ |
| 3456 | +void vTaskExitCriticalFromISR( portBASE_TYPE xSavedInterruptStatus ); |
| 3457 | + |
3421 | 3458 | /* *INDENT-OFF* */
|
3422 | 3459 | #ifdef __cplusplus
|
3423 | 3460 | }
|
|
0 commit comments