mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 01:58:32 -04:00
Pass core ID to port lock macros (#1212)
Pass core ID to task/ISR lock functions
This commit is contained in:
parent
f63bc2b5cc
commit
f05244a8d5
7 changed files with 71 additions and 63 deletions
|
@ -141,18 +141,18 @@
|
|||
#endif /* if ( configNUMBER_OF_CORES > 1 ) */
|
||||
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
#define portGET_ISR_LOCK()
|
||||
#define portRELEASE_ISR_LOCK()
|
||||
#define portGET_TASK_LOCK()
|
||||
#define portRELEASE_TASK_LOCK()
|
||||
#define portGET_ISR_LOCK( xCoreID )
|
||||
#define portRELEASE_ISR_LOCK( xCoreID )
|
||||
#define portGET_TASK_LOCK( xCoreID )
|
||||
#define portRELEASE_TASK_LOCK( xCoreID )
|
||||
#else
|
||||
extern void vPortRecursiveLockAcquire( BaseType_t xFromIsr );
|
||||
extern void vPortRecursiveLockRelease( BaseType_t xFromIsr );
|
||||
extern void vPortRecursiveLockAcquire( BaseType_t xCoreID, BaseType_t xFromIsr );
|
||||
extern void vPortRecursiveLockRelease( BaseType_t xCoreID, BaseType_t xFromIsr );
|
||||
|
||||
#define portGET_ISR_LOCK() vPortRecursiveLockAcquire( pdTRUE )
|
||||
#define portRELEASE_ISR_LOCK() vPortRecursiveLockRelease( pdTRUE )
|
||||
#define portGET_TASK_LOCK() vPortRecursiveLockAcquire( pdFALSE )
|
||||
#define portRELEASE_TASK_LOCK() vPortRecursiveLockRelease( pdFALSE )
|
||||
#define portGET_ISR_LOCK( xCoreID ) vPortRecursiveLockAcquire( ( xCoreID ), pdTRUE )
|
||||
#define portRELEASE_ISR_LOCK( xCoreID ) vPortRecursiveLockRelease( ( xCoreID ), pdTRUE )
|
||||
#define portGET_TASK_LOCK( xCoreID ) vPortRecursiveLockAcquire( ( xCoreID ), pdFALSE )
|
||||
#define portRELEASE_TASK_LOCK( xCoreID ) vPortRecursiveLockRelease( ( xCoreID ), pdFALSE )
|
||||
#endif /* if ( configNUMBER_OF_CORES == 1 ) */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue