[][src]Type Definition mynewt::kernel::os::os_mempool_put_fn

type os_mempool_put_fn = Option<unsafe extern "C" fn(ome: *mut os_mempool_ext, data: *mut c_void, arg: *mut c_void) -> os_error_t>;

Block put callback function. If configured, this callback gets executed whenever a block is freed to the corresponding extended mempool. Note: The os_memblock_put() function calls this callback instead of freeing the block itself. Therefore, it is the callback's responsibility to free the block via a call to os_memblock_put_from_cb().

Return: Indicates whether the block was successfully freed. A non-zero value should only be returned if the block was not successfully released back to its pool.