posix: semaphores: use a default minimal heap-add for semaphores

The implementation of POSIX_SEMAPHORES historically used heap allocation
and has not yet been transitioned to a pool allocator.

However, since 590258b381, the default heap-add with CONFIG_POSIX_API
has been reduced from 1 kiB which causes tests/posix/semaphores to fail
due to NULL being returned from a call to k_calloc().

Create a minimal heap-add for the POSIX_SEMAPHORES Option Group.

This can be removed at a future date if semaphores are changed to use
a pooled allocator and fixed-size name, rather than heap allocation.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
Chris Friedt 2025-04-19 09:54:33 -04:00 committed by Benjamin Cabé
commit 0449324257

View file

@ -33,4 +33,7 @@ config POSIX_SEM_NAMELEN_MAX
Maximum length of name for a named semaphore.
The max value of 255 corresponds to {NAME_MAX}.
config HEAP_MEM_POOL_ADD_SIZE_POSIX_SEMAPHORES
def_int 256
endif # POSIX_SEMAPHORES