portability: cmsis: Clarify Kconfig set max limit on dynamic objects
Clarify that all max limit on RTOS objects set by Kconfig only apply to objects whose control blocks were dynamically allocated. The CMSIS-RTOSv2 impl layer itself does not restrict the number of statically created RTOS objects. Signed-off-by: Utsav Munendra <utsavm@meta.com>
This commit is contained in:
parent
c006922b22
commit
9379c35dbf
2 changed files with 30 additions and 12 deletions
|
@ -46,32 +46,36 @@ config CMSIS_V2_THREAD_DYNAMIC_STACK_SIZE
|
|||
Mention dynamic stack size threads are allocated in CMSIS RTOS V2 application.
|
||||
|
||||
config CMSIS_V2_TIMER_MAX_COUNT
|
||||
int "Maximum timer count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated timers in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention maximum number of timers in CMSIS RTOS V2 compliant application.
|
||||
Mention maximum number of timers in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
|
||||
config CMSIS_V2_MUTEX_MAX_COUNT
|
||||
int "Maximum mutex count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated mutexes in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention max number of mutexes in CMSIS RTOS V2 compliant application.
|
||||
Mention max number of mutexes in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
|
||||
config CMSIS_V2_SEMAPHORE_MAX_COUNT
|
||||
int "Maximum semaphore count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated semaphores in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention max number of semaphores in CMSIS RTOS V2 compliant application.
|
||||
Mention max number of semaphores in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
|
||||
config CMSIS_V2_MEM_SLAB_MAX_COUNT
|
||||
int "Maximum mem slab count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated mempools in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention maximum number of memory slabs in CMSIS RTOS V2 compliant application.
|
||||
Mention maximum number of memory slabs in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
|
||||
config CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE
|
||||
int "Maximum dynamic mem slab/pool size in CMSIS RTOS V2 application"
|
||||
|
@ -80,11 +84,12 @@ config CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE
|
|||
Mention maximum dynamic size of memory slabs/pools in CMSIS RTOS V2 compliant application.
|
||||
|
||||
config CMSIS_V2_MSGQ_MAX_COUNT
|
||||
int "Maximum message queue count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated message queues in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention maximum number of message queues in CMSIS RTOS V2 compliant application.
|
||||
Mention maximum number of message queues in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
|
||||
config CMSIS_V2_MSGQ_MAX_DYNAMIC_SIZE
|
||||
int "Maximum dynamic message queue size in CMSIS RTOS V2 application"
|
||||
|
@ -93,9 +98,10 @@ config CMSIS_V2_MSGQ_MAX_DYNAMIC_SIZE
|
|||
Mention maximum dynamic size of message queues in CMSIS RTOS V2 compliant application.
|
||||
|
||||
config CMSIS_V2_EVT_FLAGS_MAX_COUNT
|
||||
int "Maximum event flags count in CMSIS RTOS V2 application"
|
||||
int "Maximum dynamically-allocated event flags count in CMSIS RTOS V2 application"
|
||||
default 5
|
||||
range 0 $(UINT8_MAX)
|
||||
help
|
||||
Mention maximum number of event flags in CMSIS RTOS V2 compliant application.
|
||||
Mention maximum number of event flags in CMSIS RTOS V2 compliant application that can
|
||||
be created with dynamically allocated control block.
|
||||
endif
|
||||
|
|
|
@ -186,4 +186,16 @@ ZTEST(cmsis_mutex, test_mutex_static_allocation)
|
|||
|
||||
zassert_true(osMutexDelete(id) == osOK, "osMutexDelete failed");
|
||||
}
|
||||
|
||||
ZTEST(cmsis_mutex, test_mutex_static_multiple_new)
|
||||
{
|
||||
osMutexId_t id;
|
||||
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
id = osMutexNew(&mutex_attrs2);
|
||||
zassert_not_null(id, "Failed creating mutex using static cb");
|
||||
|
||||
zassert_true(osMutexDelete(id) == osOK, "osMutexDelete failed");
|
||||
}
|
||||
}
|
||||
ZTEST_SUITE(cmsis_mutex, NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue