Skip to content

Commit c414dc2

Browse files
Xtensa_ESP32: Add definition for portMEMORY_BARRIER
This fixes crash observed in Amazon FreeRTOS when optimisations are enabled
1 parent 1b86b39 commit c414dc2

File tree

1 file changed

+4
-0
lines changed
  • portable/ThirdParty/GCC/Xtensa_ESP32/include

1 file changed

+4
-0
lines changed

portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@
554554
#define configASSERT( x ) if( !( x ) ) { porttracePrint( -1 ); printf( "\nAssertion failed in %s:%d\n", __FILE__, __LINE__ ); exit( -1 ); }
555555
#endif
556556

557+
/* Barriers */
558+
#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )
559+
560+
557561
#endif // __ASSEMBLER__
558562

559563
/* *INDENT-OFF* */

0 commit comments

Comments
 (0)