mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-15 08:26:04 +08:00
Fix the case of using STL without pthreads but with mutexes (#1433)
* Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Fix the case of using STL without pthreads but with mutexes On non-POSIX targets in STL mode, std::mutex is included from mutex.h but will probably miss pthreads. Instead, other implementations might be detected and used in mutex.h. Therefore, adding ETL_NO_STD_MUTEX as a profile option for ETL. Further, removing unnecessary includes from queue headers. --------- Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com> Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
f6f145c5e5
commit
57d3867694
@ -40,7 +40,7 @@ SOFTWARE.
|
||||
#elif defined(ETL_TARGET_OS_THREADX)
|
||||
#include "mutex/mutex_threadx.h"
|
||||
#define ETL_HAS_MUTEX 1
|
||||
#elif ETL_USING_STL && ETL_USING_CPP11
|
||||
#elif ETL_USING_STL && ETL_USING_CPP11 && ETL_USING_STD_MUTEX
|
||||
#include "mutex/mutex_std.h"
|
||||
#define ETL_HAS_MUTEX 1
|
||||
#elif defined(ETL_COMPILER_ARM5) || defined(ETL_COMPILER_ARM6) || defined(ETL_COMPILER_ARM7) || defined(ETL_COMPILER_ARM8)
|
||||
|
||||
@ -102,6 +102,16 @@ SOFTWARE.
|
||||
#define ETL_NOT_USING_STL 0
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Helper macros for ETL_NO_STD_MUTEX.
|
||||
#if defined(ETL_NO_STD_MUTEX)
|
||||
#define ETL_USING_STD_MUTEX 0
|
||||
#define ETL_NOT_USING_STD_MUTEX 1
|
||||
#else
|
||||
#define ETL_USING_STD_MUTEX 1
|
||||
#define ETL_NOT_USING_STD_MUTEX 0
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Helper macros for ETL_STLPORT.
|
||||
#if defined(ETL_STLPORT)
|
||||
|
||||
@ -35,7 +35,6 @@ SOFTWARE.
|
||||
#include "integral_limits.h"
|
||||
#include "memory.h"
|
||||
#include "memory_model.h"
|
||||
#include "mutex.h"
|
||||
#include "parameter_type.h"
|
||||
#include "placement_new.h"
|
||||
#include "utility.h"
|
||||
|
||||
@ -35,7 +35,6 @@ SOFTWARE.
|
||||
#include "alignment.h"
|
||||
#include "integral_limits.h"
|
||||
#include "memory_model.h"
|
||||
#include "mutex.h"
|
||||
#include "parameter_type.h"
|
||||
#include "placement_new.h"
|
||||
#include "utility.h"
|
||||
|
||||
@ -36,7 +36,6 @@ SOFTWARE.
|
||||
#include "integral_limits.h"
|
||||
#include "memory.h"
|
||||
#include "memory_model.h"
|
||||
#include "mutex.h"
|
||||
#include "parameter_type.h"
|
||||
#include "placement_new.h"
|
||||
#include "utility.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user