mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
mm/mempool: rename the mempool_alloc and mempool_free function
the mempool_alloc and mempool_free function are duplicate with the mempool method that provided in optee_os, in order to port optee_os, so we rename the mempool related functions in nuttx Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -198,7 +198,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mempool_alloc
|
||||
* Name: mempool_allocate
|
||||
*
|
||||
* Description:
|
||||
* Allocate an block from a specific memory pool.
|
||||
@@ -214,7 +214,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR void *mempool_alloc(FAR struct mempool_s *pool)
|
||||
FAR void *mempool_allocate(FAR struct mempool_s *pool)
|
||||
{
|
||||
FAR sq_entry_t *blk;
|
||||
irqstate_t flags;
|
||||
@@ -285,7 +285,7 @@ out_with_lock:
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mempool_free
|
||||
* Name: mempool_release
|
||||
*
|
||||
* Description:
|
||||
* Release a memory block to the pool.
|
||||
@@ -295,7 +295,7 @@ out_with_lock:
|
||||
* blk - The pointer of memory block.
|
||||
****************************************************************************/
|
||||
|
||||
void mempool_free(FAR struct mempool_s *pool, FAR void *blk)
|
||||
void mempool_release(FAR struct mempool_s *pool, FAR void *blk)
|
||||
{
|
||||
irqstate_t flags = spin_lock_irqsave(&pool->lock);
|
||||
size_t blocksize = MEMPOOL_REALBLOCKSIZE(pool);
|
||||
|
||||
Reference in New Issue
Block a user