Closed TomSaw closed 2 weeks ago
Hm, looks like it depends on gthread support from the commend // C++ >= 17 && hosted && gthread
.
Looking at the source, this seems to indeed be the case:
https://github.com/gcc-mirror/gcc/blob/0240909cb03f2a37a74364b00e51ad782c748551/libstdc%2B%2B-v3/include/bits/version.h#L741-L748
That wasn't the case for the stdlibc++ shipped with gcc 12, so I guess I need to reimplement that functionality… ugh.
(GCC13/GCC14 is not tested with modm btw, due to the issue with the protothread/resumable macros, see #1012)
Actually, can you #define __cpp_lib_scoped_lock
before #include <mutex>
in the fiber/mutex.hpp
file? That should enable it I think.
Actually, can you
#define __cpp_lib_scoped_lock
before#include <mutex>
in thefiber/mutex.hpp
file? That should enable it I think.
Compiles fine , but i have not tested the functionality of that scoped_lock
declaration
Using
modm:processing:fibers
, i get this compiling error:Looking into
/usr/arm-none-eabi/include/c++/14.1.0/mutex
i found that it's definition is conditional on__cpp_lib_scoped_lock
, which is not defined.As a workaround, i've branched for
__cpp_lib_scoped_lock
inmodm/src/modm/processing/fiber/mutex.hpp
too:Here's my output of
arm-none-eabi-c++ -v
, using Fedora 40: