Replies: 1 comment
-
Not really an answer, but some background... The std::mutex and related are bits of C++ that require OS support. GCC's STL implementation calls to these SDK/OS/etc. defined primitives to build things like Right now the Pico SDK doesn't implement these primitives. Since they are really OS-level things (i.e. a mutex_t will not do what you want under FreeRTOS) I can understand the division. There are a few open issues (feature requests) on the Pico-SDK to do an implementation of these for GCC under bare metal and FreeRTOS (ThreadX, you're on your own! 😆 ) but I couldn't find any open PRs related to them yet. (For reference, I found something doing std::thread infra for GCC and FreeRTOS here. https://github.com/grygorek/FreeRTOS_cpp11 Same idea, we'd need to implement the low level primitives it needs.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am attempting to move some code written for C++11 which uses std::mutex and std::condition_variable. I want to run it on RP2040 hardware.
I have found out how to replace the include of mutex with <CoreMutex.h> and use mutex_t instead of std::mutex.
I would like to do the same for std::condition_variable. I cannot find any information on how to go about this.
What am I missing?
Thanks John
Beta Was this translation helpful? Give feedback.
All reactions