mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Rename kumalloc to kumm_malloc and kuzalloc to kumm_zalloc for consistency with other naming
This commit is contained in:
@@ -174,9 +174,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3773,7 +3773,7 @@ static int lpc31_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
* Some hardware supports special memory in which larger IO buffers can
|
||||
* be accessed more efficiently. This method provides a mechanism to allocate
|
||||
* the request/descriptor memory. If the underlying hardware does not support
|
||||
* such "special" memory, this functions may simply map to kumalloc.
|
||||
* such "special" memory, this functions may simply map to kumm_malloc.
|
||||
*
|
||||
* This interface differs from DRVR_ALLOC in that the buffers are variable-sized.
|
||||
*
|
||||
@@ -3802,7 +3802,7 @@ static int lpc31_ioalloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer
|
||||
* accessible (depending on how the class driver implements its buffering).
|
||||
*/
|
||||
|
||||
*buffer = (FAR uint8_t *)kumalloc(buflen);
|
||||
*buffer = (FAR uint8_t *)kumm_malloc(buflen);
|
||||
return *buffer ? OK : -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -3035,7 +3035,7 @@ static void *sam_ep_allocbuffer(struct usbdev_ep_s *ep, uint16_t nbytes)
|
||||
{
|
||||
/* There is not special buffer allocation requirement */
|
||||
|
||||
return kumalloc(nbytes);
|
||||
return kumm_malloc(nbytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3613,7 +3613,7 @@ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
* Some hardware supports special memory in which larger IO buffers can
|
||||
* be accessed more efficiently. This method provides a mechanism to allocate
|
||||
* the request/descriptor memory. If the underlying hardware does not support
|
||||
* such "special" memory, this functions may simply map to kumalloc.
|
||||
* such "special" memory, this functions may simply map to kumm_malloc.
|
||||
*
|
||||
* This interface differs from DRVR_ALLOC in that the buffers are variable-sized.
|
||||
*
|
||||
@@ -3642,7 +3642,7 @@ static int sam_ioalloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer,
|
||||
* accessible (depending on how the class driver implements its buffering).
|
||||
*/
|
||||
|
||||
*buffer = (FAR uint8_t *)kumalloc(buflen);
|
||||
*buffer = (FAR uint8_t *)kumm_malloc(buflen);
|
||||
return *buffer ? OK : -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -2677,7 +2677,7 @@ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
* Some hardware supports special memory in which larger IO buffers can
|
||||
* be accessed more efficiently. This method provides a mechanism to allocate
|
||||
* the request/descriptor memory. If the underlying hardware does not support
|
||||
* such "special" memory, this functions may simply map to kumalloc.
|
||||
* such "special" memory, this functions may simply map to kumm_malloc.
|
||||
*
|
||||
* This interface differs from DRVR_ALLOC in that the buffers are variable-sized.
|
||||
*
|
||||
@@ -2702,9 +2702,9 @@ static int sam_ioalloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer,
|
||||
{
|
||||
DEBUGASSERT(drvr && buffer);
|
||||
|
||||
/* kumalloc() should return user accessible, DMA-able memory */
|
||||
/* kumm_malloc() should return user accessible, DMA-able memory */
|
||||
|
||||
*buffer = kumalloc(buflen);
|
||||
*buffer = kumm_malloc(buflen);
|
||||
return *buffer ? OK : -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -3524,7 +3524,7 @@ static void *sam_ep_allocbuffer(struct usbdev_ep_s *ep, uint16_t nbytes)
|
||||
{
|
||||
/* There is not special buffer allocation requirement */
|
||||
|
||||
return kumalloc(nbytes);
|
||||
return kumm_malloc(nbytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
|
||||
@@ -141,9 +141,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -138,9 +138,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -159,9 +159,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
stack_alloc_ptr = (uint32_t*)kumalloc(adj_stack_size);
|
||||
stack_alloc_ptr = (uint32_t*)kumm_malloc(adj_stack_size);
|
||||
}
|
||||
if (stack_alloc_ptr) {
|
||||
/* This is the address of the last word in the allocation */
|
||||
|
||||
@@ -138,9 +138,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
|
||||
/* Allocate the memory for the stack */
|
||||
|
||||
stack_alloc_ptr = (uint32_t*)kumalloc(adj_stack_size);
|
||||
stack_alloc_ptr = (uint32_t*)kumm_malloc(adj_stack_size);
|
||||
|
||||
/* Was the allocation successful? */
|
||||
|
||||
|
||||
@@ -140,9 +140,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -118,9 +118,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
|
||||
@@ -138,9 +138,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user