commit | e539bb1979dc7d6254e2150adff711c2aec398b5 | [log] [tgz] |
---|---|---|
author | Nicolas Pitre <npitre@baylibre.com> | Tue Feb 02 22:34:21 2021 -0500 |
committer | Anas Nashif <anas.nashif@intel.com> | Mon Feb 08 12:40:16 2021 -0500 |
tree | ce95ae533d9fe43a3eb99fdc38eefb09e0c53a3b | |
parent | a00740995b3470eb38fa4e0126591c458ef50824 [diff] |
libc/minimal: restore proper locking for malloc() and friends Commit 40016a6a92f8 ("libc/minimal: Use a sys_heap for the malloc implementation") replaced sys_mem_pool_alloc() with sys_heap_alloc(). The problem is that those aren't equivalent. While the former did guard against concurrent usage, the later doesn't. Add the same locking around sys_heap_alloc() that used to be implicit with sys_mem_pool_alloc(). Signed-off-by: Nicolas Pitre <npitre@baylibre.com>