Go to the documentation of this file.
20 #ifndef __MINLIB_MNTHREAD_CONFIG_H__
21 #define __MINLIB_MNTHREAD_CONFIG_H__
30 #ifdef ESP_BUILD_WITH_SDKCONFIG
31 #include "sdkconfig.h"
36 #define MN_THREAD_CONFIG_MUTEX 1
38 #define MN_THREAD_CONFIG_COUNTING_SEMAPHORE 2
40 #define MN_THREAD_CONFIG_BINARY_SEMAPHORE 3
43 #define MN_THREAD_CONFIG_YES 1
45 #define MN_THREAD_CONFIG_NO 2
48 #define MN_THREAD_CONFIG_CORE_MAX (portNUM_PROCESSORS - 1)
54 #define MN_THREAD_CONFIG_CORE_IFNO tskNO_AFFINITY
59 #define MN_THREAD_CONFIG_CORE_ONE 0
64 #define MN_THREAD_CONFIG_CORE_TWO 1
71 #define MN_THREAD_CONFIG_ESP32 0
78 #define MN_THREAD_CONFIG_BOARD_NODEFS 99
85 #define MN_THREAD_CONFIG_OTHER 1
87 #if( configSUPPORT_STATIC_ALLOCATION == 1 )
88 #define MN_THREAD_CONFIG_STACK_DEPTH 8192
91 #ifndef MN_THREAD_CONFIG_BOARD
92 #define MN_THREAD_CONFIG_BOARD MN_THREAD_CONFIG_ESP32
98 #define MN_THREAD_CONFIG_DEFAULT_CORE MN_THREAD_CONFIG_CORE_IFNO
103 #define MN_THREAD_CONFIG_DEFAULT_WORKQUEUE_CORE MN_THREAD_CONFIG_CORE_TWO
110 #define MN_THREAD_CONFIG_ALLOCATOR_SYSTEM 1
115 #define MN_THREAD_CONFIG_ALLOCATOR_SPIRAM 2
123 #ifndef MN_THREAD_CONFIG_SIZE_TYPE
127 #define MN_THREAD_CONFIG_SIZE_TYPE long unsigned int
131 #ifndef MN_THREAD_CONFIG_USE_EXCEPTIONS
136 #define MN_THREAD_CONFIG_USE_EXCEPTIONS MN_THREAD_CONFIG_NO
139 #ifndef MN_THREAD_CONFIG_DEBUG
140 #define MN_THREAD_CONFIG_DEBUG MN_THREAD_CONFIG_YES
143 #ifndef MN_THREAD_CONFIG_STACK_TYPE
145 #define MN_THREAD_CONFIG_STACK_TYPE unsigned long
148 #ifndef MN_THREAD_CONFIG_BASIC_ALIGNMENT
149 #define MN_THREAD_CONFIG_BASIC_ALIGNMENT sizeof(unsigned char*)
152 #ifndef MN_THREAD_CONFIG_BASIC_HASHMUL_VAL
154 #define MN_THREAD_CONFIG_BASIC_HASHMUL_VAL 2149645487U
163 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_IDLE
167 #define MN_THREAD_CONFIG_CORE_PRIORITY_IDLE tskIDLE_PRIORITY
170 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_LOW
174 #define MN_THREAD_CONFIG_CORE_PRIORITY_LOW 1
177 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_NORM
181 #define MN_THREAD_CONFIG_CORE_PRIORITY_NORM 2
184 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_HALFCRT
188 #define MN_THREAD_CONFIG_CORE_PRIORITY_HALFCRT (configMAX_PRIORITIES-1)/2
191 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_URGENT
195 #define MN_THREAD_CONFIG_CORE_PRIORITY_URGENT (configMAX_PRIORITIES-2)
198 #ifndef MN_THREAD_CONFIG_CORE_PRIORITY_CRITICAL
202 #define MN_THREAD_CONFIG_CORE_PRIORITY_CRITICAL (configMAX_PRIORITIES-1)
205 #ifndef MN_THREAD_CONFIG_CONDITION_VARIABLE_SUPPORT
211 #define MN_THREAD_CONFIG_CONDITION_VARIABLE_SUPPORT MN_THREAD_CONFIG_YES
214 #ifndef MN_THREAD_CONFIG_MINIMAL_STACK_SIZE
219 #define MN_THREAD_CONFIG_MINIMAL_STACK_SIZE 2048
222 #ifndef MN_THREAD_CONFIG_MSGTASK_MAX_MESSAGES
229 #define MN_THREAD_CONFIG_MSGTASK_MAX_MESSAGES 5
233 #ifndef MN_THREAD_CONFIG_FOREIGIN_TASK_SUPPORT
241 #define MN_THREAD_CONFIG_FOREIGIN_TASK_SUPPORT MN_THREAD_CONFIG_YES
244 #ifndef MN_THREAD_CONFIG_LOCK_TYPE
252 #define MN_THREAD_CONFIG_LOCK_TYPE MN_THREAD_CONFIG_BINARY_SEMAPHORE
255 #ifndef MN_THREAD_CONFIG_ADD_TASK_TO_TASK_LIST
259 #define MN_THREAD_CONFIG_ADD_TASK_TO_TASK_LIST MN_THREAD_CONFIG_NO
267 #ifndef MN_THREAD_CONFIG_WORKQUEUE_GETNEXTITEM_TIMEOUT
273 #define MN_THREAD_CONFIG_WORKQUEUE_GETNEXTITEM_TIMEOUT 512
276 #ifndef MN_THREAD_CONFIG_WORKQUEUE_SINGLE_MAXITEMS
280 #define MN_THREAD_CONFIG_WORKQUEUE_SINGLE_MAXITEMS 8
283 #ifndef MN_THREAD_CONFIG_WORKQUEUE_SINGLE_STACKSIZE
288 #define MN_THREAD_CONFIG_WORKQUEUE_SINGLE_STACKSIZE MN_THREAD_CONFIG_MINIMAL_STACK_SIZE
291 #ifndef MN_THREAD_CONFIG_WORKQUEUE_SINGLE_PRIORITY
296 #define MN_THREAD_CONFIG_WORKQUEUE_SINGLE_PRIORITY mn::basic_task::priority::Low
299 #ifndef MN_THREAD_CONFIG_WORKQUEUE_MULTI_WORKER
304 #define MN_THREAD_CONFIG_WORKQUEUE_MULTI_WORKER 4
307 #ifndef MN_THREAD_CONFIG_WORKQUEUE_MULTI_MAXITEMS
312 #define MN_THREAD_CONFIG_WORKQUEUE_MULTI_MAXITEMS 8
315 #ifndef MN_THREAD_CONFIG_WORKQUEUE_MULTI_STACKSIZE
320 #define MN_THREAD_CONFIG_WORKQUEUE_MULTI_STACKSIZE MN_THREAD_CONFIG_MINIMAL_STACK_SIZE
323 #ifndef MN_THREAD_CONFIG_WORKQUEUE_MULTI_PRIORITY
328 #define MN_THREAD_CONFIG_WORKQUEUE_MULTI_PRIORITY mn::basic_task::priority::Low
336 #ifndef MN_THREAD_CONFIG_TIMEOUT_SEMAPHORE_DEFAULT
342 #define MN_THREAD_CONFIG_TIMEOUT_SEMAPHORE_DEFAULT (unsigned int) 0xffffffffUL
345 #ifndef MN_THREAD_CONFIG_CSEMAPHORE_MIN_COUNT
349 #define MN_THREAD_CONFIG_CSEMAPHORE_MIN_COUNT 1
352 #ifndef MN_THREAD_CONFIG_CSEMAPHORE_MAX_COUNT
357 #define MN_THREAD_CONFIG_CSEMAPHORE_MAX_COUNT 0x7fffffff
362 #ifndef MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT
368 #define MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT (unsigned int) 0xffffffffUL
371 #ifndef MN_THREAD_CONFIG_RECURSIVE_MUTEX_CHEAKING
376 #define MN_THREAD_CONFIG_RECURSIVE_MUTEX_CHEAKING MN_THREAD_CONFIG_YES
381 #ifndef MN_THREAD_CONFIG_TIMEOUT_QUEUE_DEFAULT
387 #define MN_THREAD_CONFIG_TIMEOUT_QUEUE_DEFAULT (unsigned int) 0xffffffffUL
394 #ifndef MN_THREAD_CONFIG_TIMEOUT_COROUTINE_DEFAULT
400 #define MN_THREAD_CONFIG_TIMEOUT_COROUTINE_DEFAULT (unsigned int) 0xffffffffUL
407 #ifndef MN_THREAD_CONFIG_SHAREDOBJECT_PREUSING
409 #define MN_THREAD_CONFIG_SHAREDOBJECT_PREUSING MN_THREAD_CONFIG_YES
416 #ifndef MN_THREAD_CONFIG_MEMPOOL_USE_MAGIC
418 #define MN_THREAD_CONFIG_MEMPOOL_USE_MAGIC MN_THREAD_CONFIG_NO
421 #ifndef MN_THREAD_CONFIG_MEMPOOL_MAGIC_START
423 #define MN_THREAD_CONFIG_MEMPOOL_MAGIC_START 0x6d
426 #ifndef MN_THREAD_CONFIG_MEMPOOL_MAGIC_END
428 #define MN_THREAD_CONFIG_MEMPOOL_MAGIC_END 0xa8
431 #ifndef MN_THREAD_CONFIG_MEMPOOL_USETIMED
437 #define MN_THREAD_CONFIG_MEMPOOL_USETIMED MN_THREAD_CONFIG_YES
445 #ifndef MN_THREAD_CONFIG_ALLOCATOR_DEFAULT
450 #define MN_THREAD_CONFIG_ALLOCATOR_DEFAULT MN_THREAD_CONFIG_ALLOCATOR_SYSTEM
458 #ifndef MN_THREAD_CONFIG_TICKHOOK_MAXENTRYS
460 #define MN_THREAD_CONFIG_TICKHOOK_MAXENTRYS 10
469 #ifndef MN_THREAD_CONFIG_NET_IPADDRESS6_ENABLE
470 #define MN_THREAD_CONFIG_NET_IPADDRESS6_ENABLE MN_THREAD_CONFIG_YES
473 #ifndef MN_THREAD_CONFIG_NET_IPADDRESS6_USE_SCOPEID
474 #define MN_THREAD_CONFIG_NET_IPADDRESS6_USE_SCOPEID MN_THREAD_CONFIG_NO
477 #ifndef MN_THREAD_CONFIG_NET_IPADDRESS6_SCOPEID_VAL
478 #define MN_THREAD_CONFIG_NET_IPADDRESS6_SCOPEID_VAL 0
483 #ifndef MN_THREAD_CONFIG_PREVIEW_FUTURE
490 #define MN_THREAD_CONFIG_PREVIEW_FUTURE MN_THREAD_CONFIG_NO
496 #if MN_THREAD_CONFIG_PREVIEW_FUTURE == MN_THREAD_CONFIG_YES
498 #define MN_THREAD_BETA_MAJOR_VERSION 2
500 #define MN_THREAD_BETA_MINOR_VERSION 0
502 #define MN_THREAD_BETA_VERSION_STRING "-beta2.0"
504 #define MN_THREAD_BETA_VERSION_STRING
505 #define MN_THREAD_BETA_MAJOR_VERSION 0
506 #define MN_THREAD_BETA_MINOR_VERSION 0
513 #if (configUSE_RECURSIVE_MUTEXES == 1)
515 #if (MN_THREAD_CONFIG_RECURSIVE_MUTEX_CHEAKING == MN_THREAD_CONFIG_YES)
519 #define MN_THREAD_CONFIG_RECURSIVE_MUTEX MN_THREAD_CONFIG_YES
524 #define MN_THREAD_CONFIG_RECURSIVE_MUTEX MN_THREAD_CONFIG_NO
525 #warning ("recursive mutex are not supported")
531 #ifndef MN_THREAD_CONFIG_FREELIST_MEMPOOL_FREE
533 #define MN_THREAD_CONFIG_FREELIST_MEMPOOL_FREE 1
536 #ifndef MN_THREAD_CONFIG_FREELIST_MEMPOOL_USED
538 #define MN_THREAD_CONFIG_FREELIST_MEMPOOL_USED 0
541 #ifndef MN_THREAD_CONFIG_USE_TRACE
542 #define MN_THREAD_CONFIG_USE_TRACE configUSE_TRACE_FACILITY
545 #if defined(__has_builtin)
546 #define MN_THREAD_CONFIG_HAS_BUILTIN MN_THREAD_CONFIG_YES
548 #define MN_THREAD_CONFIG_HAS_BUILTIN MN_THREAD_CONFIG_NO