With default configuration, LwMEM library is not thread safe. This means whenever it is used with operating system, user must resolve it with care.
Library has locking mechanism support for thread safety, which needs to be enabled manually.
Tip
To enable thread-safety support, parameter LWMEM_CFG_OS
must be set to 1
. Please check api_lwmem_opt
for more information about other options.
After thread-safety features has been enabled, it is necessary to implement 4
low-level system functions.
Tip
System function template example is available in lwmem/src/system/
folder.
Example code for CMSIS-OS V2
Note
Check api_lwmem_sys
section for function description
../../lwmem/src/system/lwmem_sys_cmsis_os.c