#include <oskit/c/malloc.h>void mem_unlock(void);
This routine is called from any default memory allocation routine after all accesses to malloc_lmm are complete.Coupled with mem_lock, this provides a way to make memory allocation thread and MP safe. In a multithreaded client OS, these functions will use the default lock implementation as provided by the lock manager (see Section 4.12), to protect accesses to the malloc_lmm. Or, these functions may be overridden with a suitable synchronization primitive.
Note that the kernel support library provides defaults for mem_lock and mem_unlock that call base_critical_enter and base_critical_leave respectively. However, you'll only get these versions if you use the kernel support library and link it in before the minimal C library.