mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Rename kmalloc to kmm_malloc for consistency
This commit is contained in:
@@ -102,7 +102,7 @@ int rtos_bridge_init(struct rgmp_bridge *b)
|
||||
struct bridge *bridge;
|
||||
char path[30] = {'/', 'd', 'e', 'v', '/'};
|
||||
|
||||
if ((bridge = kmalloc(sizeof(*bridge))) == NULL)
|
||||
if ((bridge = kmm_malloc(sizeof(*bridge))) == NULL)
|
||||
goto err0;
|
||||
|
||||
bridge->b = b;
|
||||
|
||||
@@ -130,7 +130,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the kernel allocator if this is a kernel thread */
|
||||
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL) {
|
||||
stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ void rtos_free_page(void *page)
|
||||
|
||||
void *rtos_kmalloc(int size)
|
||||
{
|
||||
return kmalloc(size);
|
||||
return kmm_malloc(size);
|
||||
}
|
||||
|
||||
void rtos_kfree(void *addr)
|
||||
@@ -130,7 +130,7 @@ void rtos_timer_isr(void *data)
|
||||
*/
|
||||
int rtos_sem_init(struct semaphore *sem, int val)
|
||||
{
|
||||
if ((sem->sem = kmalloc(sizeof(sem_t))) == NULL)
|
||||
if ((sem->sem = kmm_malloc(sizeof(sem_t))) == NULL)
|
||||
return -1;
|
||||
return sem_init(sem->sem, 0, val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user