lib/cmsis_rtos_v1: Implement support for mempool APIs

These APIs allow creating, allocating and freeing
of mempools.

Note: "Mempool" in CMSIS actually means memslabs in Zephyr.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This commit is contained in:
Rajavardhan Gundi 2018-07-12 15:15:57 +05:30 committed by Anas Nashif
commit aff8c51128
3 changed files with 76 additions and 1 deletions

View file

@ -535,8 +535,9 @@ osStatus osSemaphoreDelete (osSemaphoreId semaphore_id);
extern const osPoolDef_t os_pool_def_##name
#else // define the object
#define osPoolDef(name, no, type) \
K_MEM_SLAB_DEFINE(os_mem_##name, sizeof(type), no, 4); \
const osPoolDef_t os_pool_def_##name = \
{ (no), sizeof(type), NULL }
{ (no), sizeof(type), &os_mem_##name }
#endif
/// \brief Access a Memory Pool definition.