zephyr/lib
Keith Packard 021923b58a libc/picolibc: Use mutexes instead of semaphores for non-recursive locks
Picolibc has both recursive and non-recursive mutex uses. The bulk of the
library locking uses the global libc lock, which is a recursive mutex as
that greatly simplifies the implementation.

The only use of non-recursive mutexes is in the stdio code when dealing
with file system I/O via fopen.

Using mutexes for both APIs is valid; the assumption picolibc makes is that
the non-recursive mutexes are somehow cheaper or faster and should be
preferred. However, in Zephyr, recursive mutexes are the default and the
non-recursive locks for picolibc were implemented using semaphores.

Switch the non-recursive picolibc locks to just invoking the existing
recursive functions using mutexes. This avoids pulling in another lock
implementation, saving a bit of space.

This also lets the kernel.memory_protection.mem_map test work on
qemu_x86_tiny where the amount of memory available is 320kB and that is
nearly filled by this test case, leaving too little space for allocating
pages in the k_mem_map_unmap test.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-07-10 15:11:15 +02:00
..
acpi lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
cpp Kconfig: Tidy up dependants of NATIVE_APPLICATION 2023-07-05 07:01:19 -04:00
hash lib: hashmap: Move hash table files lib/hashmap 2023-03-02 12:03:07 -05:00
libc libc/picolibc: Use mutexes instead of semaphores for non-recursive locks 2023-07-10 15:11:15 +02:00
open-amp open-amp: Fix compilation with cache enabled 2023-04-18 12:12:56 +02:00
os json: Fix 64-bit support 2023-06-29 21:03:48 +02:00
posix posix: implement timer_getoverrun() 2023-07-10 09:30:33 +02:00
smf lib: smf: fix include 2022-05-25 11:14:18 +09:00
CMakeLists.txt lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
Kconfig lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00