zephyr/include/mempool_heap.h
Andy Ross 3c2c1d85b0 kernel: Remove z_mem_pool wrapper internals
These implemented a k_mem_pool in terms of the now universal k_heap
utility.  That's no longer necessary now that the k_mem_pool API has
been removed.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-07 21:50:14 -05:00

31 lines
624 B
C

/*
* Copyright (c) 2020 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_MEMPOOL_HEAP_H_
/* Compatibility implementation of a k_mem_pool backend in terms of a
* k_heap
*/
/* The "ID" of a k_heap-based mempool is just the tuple of the data
* block pointer and the heap that allocated it
*/
struct k_mem_block_id {
void *data;
struct k_heap *heap;
};
/* Note the data pointer gets unioned with the same value stored in
* the ID field to save space.
*/
struct k_mem_block {
union {
void *data;
struct k_mem_block_id id;
};
};
#endif /* ZEPHYR_INCLUDE_MEMPOOL_HEAP_H_ */