Skip to content

Commit

Permalink
Xtensa_ESP32: Add definition for portMEMORY_BARRIER (FreeRTOS#395)
Browse files Browse the repository at this point in the history
This fixes crash observed in Amazon FreeRTOS when optimisations are enabled
  • Loading branch information
shubhamkulkarni97 authored Sep 16, 2021
1 parent 1b86b39 commit 741185f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@
#define configASSERT( x ) if( !( x ) ) { porttracePrint( -1 ); printf( "\nAssertion failed in %s:%d\n", __FILE__, __LINE__ ); exit( -1 ); }
#endif

/* Barriers */
#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )


#endif // __ASSEMBLER__

/* *INDENT-OFF* */
Expand Down

0 comments on commit 741185f

Please sign in to comment.