From 590258b3814ef0eac8a84b7b0906caf518096573 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sat, 12 Apr 2025 16:00:19 +1000 Subject: [PATCH] posix: options: `POSIX_THREADS` require a stack `pthread_setspecific` requires a stack in order to allocate the `struct pthread_key_data` data structure. On 64 bit systems this data structure is 32 bytes, resulting in 160 bytes usage for the default 5 supported threads. Signed-off-by: Jordan Yates --- lib/posix/options/Kconfig.pthread | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/posix/options/Kconfig.pthread b/lib/posix/options/Kconfig.pthread index 4eef794039a..438506fe218 100644 --- a/lib/posix/options/Kconfig.pthread +++ b/lib/posix/options/Kconfig.pthread @@ -15,6 +15,9 @@ menuconfig POSIX_THREADS if POSIX_THREADS +config HEAP_MEM_POOL_ADD_SIZE_POSIX_THREADS + def_int 256 + config POSIX_THREAD_THREADS_MAX int "Maximum number of POSIX threads" default 5