Fix portSET_INTERRUPT_MASK_FROM_ISR definition for atomic operation (#940)

* Introduce portHAS_NESTED_INTERRUPTS to identify if port has nested interrupt or not.
* Update atomic.h to use portHAS_NESTED_INTERRUPTS instead of portSET_INTERRUPT_MASK_FROM_ISR definition.

---------

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
This commit is contained in:
chinglee-iot 2024-01-03 15:47:05 +08:00 committed by GitHub
parent 75c4044b7e
commit be880a1fc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 12 deletions

View file

@ -139,9 +139,6 @@
#define portSET_INTERRUPT_MASK() rtos_interrupt_mask_all()
#define portCLEAR_INTERRUPT_MASK( ulState ) rtos_interrupt_mask_set( ulState )
#define portSET_INTERRUPT_MASK_FROM_ISR() ( 0 )
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( ( void ) x )
/*
* Will enable interrupts if ulState is non-zero.
*/