The behavior of portSET_INTERRUPT_MASK_FROM_ISR() has changed in SMP FreeRTOS. It's
previous behavior is now implemented in portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS().
This commit replaces all portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR()
calls with portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS() respectively
Also use `unsigned int`, `short unsigned int`,`long long unsigned int` etc types
instead of uintN_t. Because some platforms have uintN_t types that don't
conrrespont to built-in prototypes.
* Adds implementations of __{atomic,sync}_nand_fetch_n. These builtins
were implemented for other operations but were not defined for NAND.
* Adds implementation of __atomic_OP_fetch_n for all OPs.
* Adds implementation of __sync_OP_and_fetch_n for all OPs.
Reported in https://github.com/espressif/arduino-esp32/issues/5948
This commit removes the following critical nested macros as follows:
- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()
They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.
Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
* CI errors led me to believe these were needed, but as it turns out the
load/store intrinsics are required even when idf is built by gcc when
linking to a clang based project.
* remove ... postfix inside `SYNC_LOCK_TEST_AND_SET` expansion
Provide emulated atomic load & store libcalls for u8, u16 & u32 integer
types. This is required when building with Clang as llvm does not lower
these operations to native load / stores, where as gcc does.
Provide `sync_lock_test_and_set` atomic implementations for all
supported integer types.
Closes https://github.com/espressif/esp-idf/issues/7591.
Closes https://github.com/espressif/esp-idf/issues/7592.