Skip to content

Commit c4db06f

Browse files
committed
#6 - Added ESPRESSIO_THREAD_DEFAULT_STACK_SIZE define (defaults to 4000 if not explicitly provided by the project)
1 parent b7ba98f commit c4db06f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ESPressio_Thread.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#include "ESPressio_IThread.hpp"
44
#include "ESPressio_ThreadSafe.hpp"
55

6+
ifndef ESPRESSIO_THREAD_DEFAULT_STACK_SIZE
7+
#define ESPRESSIO_THREAD_DEFAULT_STACK_SIZE 4000
8+
endif
9+
610
namespace ESPressio {
711

812
namespace Threads {
@@ -22,7 +26,7 @@ namespace ESPressio {
2226
ReadWriteMutex<bool> _freeOnTerminate = ReadWriteMutex<bool>(false);
2327
ReadWriteMutex<bool> _startOnInitialize = ReadWriteMutex<bool>(true);
2428
TaskHandle_t _taskHandle = nullptr; // SHOULD be Atomic!
25-
ReadWriteMutex<uint32_t> _stackSize = ReadWriteMutex<uint32_t>(10000);
29+
ReadWriteMutex<uint32_t> _stackSize = ReadWriteMutex<uint32_t>(ESPRESSIO_THREAD_DEFAULT_STACK_SIZE);
2630
ReadWriteMutex<UBaseType_t> _priority = ReadWriteMutex<UBaseType_t>(2);
2731
ReadWriteMutex<BaseType_t> _coreID = ReadWriteMutex<BaseType_t>(0);
2832

0 commit comments

Comments
 (0)