tinyusb icon indicating copy to clipboard operation
tinyusb copied to clipboard

Use LDREX/STREX on ARM cortex for mutex

Open hathach opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. LDREX/STREX instructions are available on ARM cortex M3/M4/M7 which can be used for mutex on multiple cores MCUs

Reference

  • https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/562#issuecomment-681583256
  • https://devblogs.microsoft.com/oldnewthing/20180329-00/?p=98375
  • https://community.arm.com/developer/ip-products/processors/f/cortex-m-forum/10361/ldrex-strex-on-the-m3-m4-m7
  • https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins
  • https://en.cppreference.com/w/c/atomic

hathach avatar Feb 19 '21 05:02 hathach