From ed4b948d8e07c40a211f2da6da2e0ad17a43f6a1 Mon Sep 17 00:00:00 2001 From: Ari Parkkila Date: Thu, 26 Sep 2019 04:33:53 -0700 Subject: [PATCH] Allow OS_THREAD_LIBSPACE_NUM as a macro --- rtos/source/TARGET_CORTEX/mbed_rtx_conf.h | 2 ++ rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h | 2 ++ tools/test_configs/CellularInterface.json | 3 +++ 3 files changed, 7 insertions(+) diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_conf.h b/rtos/source/TARGET_CORTEX/mbed_rtx_conf.h index 1679b17117d..e7c68925802 100644 --- a/rtos/source/TARGET_CORTEX/mbed_rtx_conf.h +++ b/rtos/source/TARGET_CORTEX/mbed_rtx_conf.h @@ -82,7 +82,9 @@ // Provide Mbed-specific instead. #define RTX_NO_MULTITHREAD_CLIB // LIBSPACE default value set for ARMCC +#ifndef OS_THREAD_LIBSPACE_NUM #define OS_THREAD_LIBSPACE_NUM 4 +#endif #define OS_IDLE_THREAD_NAME "rtx_idle" #define OS_TIMER_THREAD_NAME "rtx_timer" diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h b/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h index 3021efbc8a9..0e4f9b78446 100644 --- a/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h +++ b/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h @@ -568,7 +568,9 @@ // Number of Threads which use standard C/C++ library libspace // (when thread specific memory allocation is not used). #if (OS_THREAD_OBJ_MEM == 0) +#ifndef OS_THREAD_LIBSPACE_NUM #define OS_THREAD_LIBSPACE_NUM 4 +#endif #else #define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM #endif diff --git a/tools/test_configs/CellularInterface.json b/tools/test_configs/CellularInterface.json index 758e1037bd9..e12b3cab984 100644 --- a/tools/test_configs/CellularInterface.json +++ b/tools/test_configs/CellularInterface.json @@ -1,4 +1,7 @@ { + "macros": [ + "OS_THREAD_LIBSPACE_NUM=5" + ], "config": { "echo-server-addr" : { "help" : "IP address of echo server",