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!
CoreMutex
could 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_t
is actually just a silly typo on my part, and was of course meant to be auint8_t
just like the constructoroption
parameter.The
__isFreeRTOS
is just a C/C++ linkage issue where I seem to have declared it inArduino.h
inside anextern "C"
block, but in the FreeRTOS shim layer header w/o theextern "C"
. The actual variable isC++
linkage inmain.cpp
so Arduino.h needs to move it around.Changes in #1312 should clear these two up.