How to use the CoreMutex class? #1311
-
|
I'd like to protect access to a data structure that is modified on core 1 and read by core 0. https://github.com/joba-1/PicoPresence/blob/master/src/radar.cpp#L4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Interesting observations! The The Changes in #1312 should clear these two up. |
Beta Was this translation helpful? Give feedback.
Interesting observations!
CoreMutexcould be used by and app, but it's so simple I didn't document it or try it outside of the core.The
u_int8_tis actually just a silly typo on my part, and was of course meant to be auint8_tjust like the constructoroptionparameter.The
__isFreeRTOSis just a C/C++ linkage issue where I seem to have declared it inArduino.hinside anextern "C"block, but in the FreeRTOS shim layer header w/o theextern "C". The actual variable isC++linkage inmain.cppso Arduino.h needs to move it around.Changes in #1312 should clear these two up.