Open KammutierSpule opened 2 months ago
@KammutierSpule
Having an implementation of mutex that does nothing in the library could be quite dangerous as it would open the possibility of compiling code that expects a working mutex with a null implementation without any warning.
What I do is dependent on the usecase, but typically I:
etl::lock_guard
is provided even when etl::mutex
is not)ETL_HAS_MUTEX
macro or by some config options, depending on contextetl::mutex
, worst case scenario when having to port to a non-supported platform I will have to provide some polyfill or refactor the existing implementation.Hopefully that's helpful to you.
// I'm not not related to ETL, just random user
I would like to include etl/mutex.h and etl:mutex but to be used on non-OS (or custom) targets It may be allowed to include a user include file or some other way that can result on a "compile to nothing" or user implementation.