unified: Eliminate k_mem_pool_t typedef

Replaces it with a pointer as there is no need for an opaque memory
pool type.

Jira: ZEP-916
Change-Id: I5493eed25c9c34e1b850dc3b20699864edb22d28
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2016-09-29 14:07:36 -04:00 committed by Benjamin Walsh
commit 0cb65c3c0d
3 changed files with 6 additions and 6 deletions

View file

@ -95,7 +95,6 @@ struct k_mem_pool;
struct k_timer;
typedef struct tcs *k_tid_t;
typedef struct k_mem_pool *k_mem_pool_t;
/* threads/scheduler/execution contexts */
@ -841,7 +840,7 @@ static inline int k_msgq_num_used_get(struct k_msgq *q)
}
struct k_mem_block {
k_mem_pool_t pool_id;
struct k_mem_pool *pool_id;
void *addr_in_pool;
void *data;
uint32_t req_size;
@ -902,7 +901,8 @@ extern void k_mbox_async_put(struct k_mbox *mbox, struct k_mbox_msg *msg,
extern int k_mbox_get(struct k_mbox *mbox, struct k_mbox_msg *msg,
void *buffer, int32_t timeout);
extern void k_mbox_data_get(struct k_mbox_msg *msg, void *buffer);
extern int k_mbox_data_block_get(struct k_mbox_msg *msg, k_mem_pool_t pool,
extern int k_mbox_data_block_get(struct k_mbox_msg *msg,
struct k_mem_pool *pool,
struct k_mem_block *block, int32_t timeout);
/* pipes */

View file

@ -429,7 +429,7 @@ void k_mbox_data_get(struct k_mbox_msg *rx_msg, void *buffer)
*
* @return 0 if successful, -ENOMEM if failed immediately, -EAGAIN if timed out
*/
int k_mbox_data_block_get(struct k_mbox_msg *rx_msg, k_mem_pool_t pool,
int k_mbox_data_block_get(struct k_mbox_msg *rx_msg, struct k_mem_pool *pool,
struct k_mem_block *block, int32_t timeout)
{
int result;

View file

@ -470,7 +470,7 @@ static void block_waiters_check(struct k_mem_pool *pool)
*
* @return N/A
*/
void k_mem_pool_defrag(k_mem_pool_t pool)
void k_mem_pool_defrag(struct k_mem_pool *pool)
{
k_sched_lock();
@ -489,7 +489,7 @@ void k_mem_pool_defrag(k_mem_pool_t pool)
*
* @return N/A
*/
int k_mem_pool_alloc(k_mem_pool_t pool, struct k_mem_block *block,
int k_mem_pool_alloc(struct k_mem_pool *pool, struct k_mem_block *block,
int size, int32_t timeout)
{
char *found_block;