Rename kmalloc to kmm_malloc for consistency
This commit is contained in:
parent
fcd7b9336e
commit
10ca085b09
@ -165,7 +165,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -675,10 +675,10 @@ static int dm320_allocvideomemory(void)
|
||||
{
|
||||
#ifndef CONFIG_DM320_VID0_DISABLE
|
||||
#ifndef CONFIG_DM320_DISABLE_PINGPONG
|
||||
g_vid0base = (FAR void *)kmalloc(2 * DM320_VID0_FBLEN);
|
||||
g_vid0base = (FAR void *)kmm_malloc(2 * DM320_VID0_FBLEN);
|
||||
g_vid0ppbase = (FAR char*)g_vid0base + DM320_VID0_FBLEN;
|
||||
#else
|
||||
g_vid0base = (FAR void *)kmalloc(DM320_VID0_FBLEN);
|
||||
g_vid0base = (FAR void *)kmm_malloc(DM320_VID0_FBLEN);
|
||||
#endif
|
||||
if (!g_vid0base)
|
||||
{
|
||||
@ -687,7 +687,7 @@ static int dm320_allocvideomemory(void)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DM320_VID1_DISABLE
|
||||
g_vid1base = (FAR void *)kmalloc(DM320_VID1_FBLEN);
|
||||
g_vid1base = (FAR void *)kmm_malloc(DM320_VID1_FBLEN);
|
||||
if (!g_vid1base)
|
||||
{
|
||||
goto errout;
|
||||
@ -695,7 +695,7 @@ static int dm320_allocvideomemory(void)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DM320_OSD0_DISABLE
|
||||
g_osd0base = (FAR void *)kmalloc(DM320_OSD0_FBLEN);
|
||||
g_osd0base = (FAR void *)kmm_malloc(DM320_OSD0_FBLEN);
|
||||
if (!g_osd0base)
|
||||
{
|
||||
goto errout;
|
||||
@ -703,7 +703,7 @@ static int dm320_allocvideomemory(void)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DM320_OSD1_DISABLE
|
||||
g_osd1base = (FAR void *)kmalloc(DM320_OSD1_FBLEN);
|
||||
g_osd1base = (FAR void *)kmm_malloc(DM320_OSD1_FBLEN);
|
||||
if (!g_osd1base)
|
||||
{
|
||||
goto errout;
|
||||
|
@ -1937,7 +1937,7 @@ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct dm320_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct dm320_req_s *)kmalloc(sizeof(struct dm320_req_s));
|
||||
privreq = (FAR struct dm320_req_s *)kmm_malloc(sizeof(struct dm320_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(DM320_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -1988,7 +1988,7 @@ static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
return usbdev_dma_alloc(bytes);
|
||||
#else
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -2659,7 +2659,7 @@ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc17_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct lpc17_req_s *)kmalloc(sizeof(struct lpc17_req_s));
|
||||
privreq = (FAR struct lpc17_req_s *)kmm_malloc(sizeof(struct lpc17_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -2729,7 +2729,7 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes
|
||||
#else
|
||||
|
||||
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -1949,7 +1949,7 @@ static int lpc17_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* Some hardware supports special memory in which request and descriptor data 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 kmalloc.
|
||||
* such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface was optimized under a particular assumption. It was assumed
|
||||
* that the driver maintains a pool of small, pre-allocated buffers for descriptor
|
||||
@ -2039,7 +2039,7 @@ static int lpc17_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 kmalloc.
|
||||
* such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface differs from DRVR_ALLOC in that the buffers are variable-sized.
|
||||
*
|
||||
|
@ -2623,7 +2623,7 @@ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct lpc214x_req_s *)kmalloc(sizeof(struct lpc214x_req_s));
|
||||
privreq = (FAR struct lpc214x_req_s *)kmm_malloc(sizeof(struct lpc214x_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -2693,7 +2693,7 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt
|
||||
#else
|
||||
|
||||
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -3690,7 +3690,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* Some hardware supports special memory in which request and descriptor data
|
||||
* 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 kmalloc.
|
||||
* not support such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface was optimized under a particular assumption. It was
|
||||
* assumed that the driver maintains a pool of small, pre-allocated buffers
|
||||
@ -3723,7 +3723,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* There is no special requirements for transfer/descriptor buffers. */
|
||||
|
||||
*buffer = (FAR uint8_t *)kmalloc(CONFIG_LPC31_EHCI_BUFSIZE);
|
||||
*buffer = (FAR uint8_t *)kmm_malloc(CONFIG_LPC31_EHCI_BUFSIZE);
|
||||
if (*buffer)
|
||||
{
|
||||
*maxlen = CONFIG_LPC31_EHCI_BUFSIZE;
|
||||
|
@ -1950,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc31_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct lpc31_req_s *)kmalloc(sizeof(struct lpc31_req_s));
|
||||
privreq = (FAR struct lpc31_req_s *)kmm_malloc(sizeof(struct lpc31_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -2001,7 +2001,7 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
return usbdev_dma_alloc(bytes);
|
||||
#else
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1193,7 +1193,7 @@ FAR struct mtd_dev_s *lpc43_spifi_initialize(void)
|
||||
|
||||
/* Allocate a buffer for the erase block cache */
|
||||
|
||||
priv->cache = (FAR uint8_t *)kmalloc(SPIFI_BLKSIZE);
|
||||
priv->cache = (FAR uint8_t *)kmm_malloc(SPIFI_BLKSIZE);
|
||||
if (!priv->cache)
|
||||
{
|
||||
/* Allocation failed! Discard all of that work we just did and return NULL */
|
||||
|
@ -1950,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc43_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct lpc43_req_s *)kmalloc(sizeof(struct lpc43_req_s));
|
||||
privreq = (FAR struct lpc43_req_s *)kmm_malloc(sizeof(struct lpc43_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -2001,7 +2001,7 @@ static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
return usbdev_dma_alloc(bytes);
|
||||
#else
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -2987,7 +2987,7 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
privreq = (struct sam_req_s *)kmalloc(sizeof(struct sam_req_s));
|
||||
privreq = (struct sam_req_s *)kmm_malloc(sizeof(struct sam_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(SAM_TRACEERR_ALLOCFAIL), 0);
|
||||
|
@ -2598,7 +2598,7 @@ config SAMA5_UDPHS_PREALLOCATE
|
||||
---help---
|
||||
If this option is selected then DMA transfer descriptors will be
|
||||
pre-allocated in .bss. Otherwise, the descriptors will be allocated
|
||||
at start-up time with kmalloc(). This might be important if a larger
|
||||
at start-up time with kmm_malloc(). This might be important if a larger
|
||||
memory pool is available after startup.
|
||||
|
||||
config SAMA5_UDPHS_REGDEBUG
|
||||
|
@ -3530,7 +3530,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* Some hardware supports special memory in which request and descriptor data
|
||||
* 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 kmalloc.
|
||||
* not support such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface was optimized under a particular assumption. It was
|
||||
* assumed that the driver maintains a pool of small, pre-allocated buffers
|
||||
@ -3563,7 +3563,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* There is no special requirements for transfer/descriptor buffers. */
|
||||
|
||||
*buffer = (FAR uint8_t *)kmalloc(CONFIG_SAMA5_EHCI_BUFSIZE);
|
||||
*buffer = (FAR uint8_t *)kmm_malloc(CONFIG_SAMA5_EHCI_BUFSIZE);
|
||||
if (*buffer)
|
||||
{
|
||||
*maxlen = CONFIG_SAMA5_EHCI_BUFSIZE;
|
||||
|
@ -2589,7 +2589,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* Some hardware supports special memory in which request and descriptor data 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 kmalloc.
|
||||
* such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface was optimized under a particular assumption. It was assumed
|
||||
* that the driver maintains a pool of small, pre-allocated buffers for descriptor
|
||||
|
@ -3476,7 +3476,7 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
privreq = (struct sam_req_s *)kmalloc(sizeof(struct sam_req_s));
|
||||
privreq = (struct sam_req_s *)kmm_malloc(sizeof(struct sam_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(SAM_TRACEERR_ALLOCFAIL), 0);
|
||||
|
@ -1922,7 +1922,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
|
||||
|
||||
/* Allocate instance */
|
||||
|
||||
if (!(inst = kmalloc(sizeof(struct stm32_i2c_inst_s))))
|
||||
if (!(inst = kmm_malloc(sizeof(struct stm32_i2c_inst_s))))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2450,7 +2450,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
|
||||
|
||||
/* Allocate instance */
|
||||
|
||||
if (!(inst = kmalloc(sizeof(struct stm32_i2c_inst_s))))
|
||||
if (!(inst = kmm_malloc(sizeof(struct stm32_i2c_inst_s))))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -4237,7 +4237,7 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep)
|
||||
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct stm32_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (FAR struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s));
|
||||
privreq = (FAR struct stm32_req_s *)kmm_malloc(sizeof(struct stm32_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -4288,7 +4288,7 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
return usbdev_dma_alloc(bytes);
|
||||
#else
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -3480,7 +3480,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
* Some hardware supports special memory in which request and descriptor data 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 kmalloc.
|
||||
* such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface was optimized under a particular assumption. It was assumed
|
||||
* that the driver maintains a pool of small, pre-allocated buffers for descriptor
|
||||
@ -3514,7 +3514,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* There is no special memory requirement for the STM32. */
|
||||
|
||||
alloc = (FAR uint8_t *)kmalloc(CONFIG_STM32_OTGFS_DESCSIZE);
|
||||
alloc = (FAR uint8_t *)kmm_malloc(CONFIG_STM32_OTGFS_DESCSIZE);
|
||||
if (!alloc)
|
||||
{
|
||||
return -ENOMEM;
|
||||
@ -3566,7 +3566,7 @@ static int stm32_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 kmalloc.
|
||||
* such "special" memory, this functions may simply map to kmm_malloc.
|
||||
*
|
||||
* This interface differs from DRVR_ALLOC in that the buffers are variable-sized.
|
||||
*
|
||||
@ -3595,7 +3595,7 @@ static int stm32_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* There is no special memory requirement */
|
||||
|
||||
alloc = (FAR uint8_t *)kmalloc(buflen);
|
||||
alloc = (FAR uint8_t *)kmm_malloc(buflen);
|
||||
if (!alloc)
|
||||
{
|
||||
return -ENOMEM;
|
||||
|
@ -2977,7 +2977,7 @@ static struct usbdev_req_s *stm32_epallocreq(struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
privreq = (struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s));
|
||||
privreq = (struct stm32_req_s *)kmm_malloc(sizeof(struct stm32_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0);
|
||||
|
@ -2013,7 +2013,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
|
||||
|
||||
/* Allocate instance */
|
||||
|
||||
if (!(inst = kmalloc( sizeof(struct stm32_i2c_inst_s))))
|
||||
if (!(inst = kmm_malloc( sizeof(struct stm32_i2c_inst_s))))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2287,7 +2287,7 @@ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog);
|
||||
|
||||
privreq = (FAR struct avr_req_s *)kmalloc(sizeof(struct avr_req_s));
|
||||
privreq = (FAR struct avr_req_s *)kmm_malloc(sizeof(struct avr_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(AVR_TRACEERR_ALLOCFAIL), 0);
|
||||
@ -2339,7 +2339,7 @@ static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
return usbdev_dma_alloc(bytes);
|
||||
#else
|
||||
return kmalloc(bytes);
|
||||
return kmm_malloc(bytes);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -132,7 +132,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -129,7 +129,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -150,7 +150,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -3324,7 +3324,7 @@ static struct usbdev_req_s *pic32mx_epallocreq(struct usbdev_ep_s *ep)
|
||||
#endif
|
||||
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
privreq = (struct pic32mx_req_s *)kmalloc(sizeof(struct pic32mx_req_s));
|
||||
privreq = (struct pic32mx_req_s *)kmm_malloc(sizeof(struct pic32mx_req_s));
|
||||
if (!privreq)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_ALLOCFAIL), 0);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -131,7 +131,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -129,7 +129,7 @@ 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 *)kzalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -920,7 +920,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
|
||||
|
||||
/* Now, allocate an I2C instance for this caller */
|
||||
|
||||
i2c = (FAR struct ez80_i2cdev_s *)kmalloc(sizeof(FAR struct ez80_i2cdev_s));
|
||||
i2c = (FAR struct ez80_i2cdev_s *)kmm_malloc(sizeof(FAR struct ez80_i2cdev_s));
|
||||
if (i2c)
|
||||
{
|
||||
/* Initialize the allocated instance */
|
||||
|
@ -593,7 +593,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
|
||||
|
||||
/* Now, allocate an I2C instance for this caller */
|
||||
|
||||
i2c = (FAR struct z8_i2cdev_s *)kmalloc(sizeof(FAR struct z8_i2cdev_s));
|
||||
i2c = (FAR struct z8_i2cdev_s *)kmm_malloc(sizeof(FAR struct z8_i2cdev_s));
|
||||
if (i2c)
|
||||
{
|
||||
/* Initialize the allocated instance */
|
||||
|
Loading…
Reference in New Issue
Block a user